@baseplate-dev/plugin-auth 0.6.17 → 0.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +12 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +12 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +6 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +6 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +12 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +12 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +6 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +12 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +6 -0
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +6 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +36 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +6 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +60 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +12 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +6 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +6 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +6 -0
- package/dist/local-auth/admin/common.js +6 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/admin-crud-invite-user-action.generator.d.ts +531 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/admin-crud-invite-user-action.generator.js +119 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/index.d.ts +540 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/index.js +11 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-paths.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-paths.js +24 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-renderers.d.ts +276 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/template-renderers.js +45 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/typed-templates.d.ts +263 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/generated/typed-templates.js +21 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/index.d.ts +2 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/index.js +2 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.d.ts +21 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.js +69 -0
- package/dist/local-auth/admin/generators/admin-crud-invite-user-action/templates/routes/-components/invite-user-dialog.tsx +122 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +6 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +6 -0
- package/dist/local-auth/admin/node.js +13 -0
- package/dist/local-auth/admin/schema/invite-user-action.d.ts +12 -0
- package/dist/local-auth/admin/schema/invite-user-action.js +6 -0
- package/dist/local-auth/admin/web.js +8 -0
- package/dist/local-auth/core/common.js +7 -2
- package/dist/local-auth/core/components/local-auth-definition-editor.js +2 -1
- package/dist/local-auth/core/components/local-auth-web-app-settings-form.d.ts +9 -0
- package/dist/local-auth/core/components/local-auth-web-app-settings-form.js +11 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +66 -6
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +188 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +5 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +5 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +18 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +66 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +192 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +82 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/otp.constants.d.ts +19 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/otp.constants.js +20 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/otp.constants.ts +22 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +12 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +12 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +14 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-otp.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-otp.mutations.js +30 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-otp.mutations.ts +38 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/invite.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/invite.mutations.js +42 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/invite.mutations.ts +54 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +2 -19
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +1 -22
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-otp.service.d.ts +37 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-otp.service.js +225 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-otp.service.ts +333 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.d.ts +39 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.js +138 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.ts +209 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +3 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +3 -2
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts +3 -1
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js +18 -3
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts +40 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js +2 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js +20 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts +40 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js +24 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/email-otp.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/email-otp.email.js +18 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/email-otp.email.tsx +57 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/invite.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/invite.email.js +14 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/invite.email.tsx +47 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +5 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +20 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +13 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +6 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +17 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +20 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.ts +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.d.ts +66 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.js +134 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.ts +184 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +8 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +38 -5
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +840 -268
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js +3 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +18 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +51 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +608 -283
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +69 -23
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-otp-constants.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-otp-constants.js +10 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-otp-constants.ts +11 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.js +148 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.tsx +264 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.js +184 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login-otp.tsx +311 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +2 -9
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +12 -0
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +12 -0
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +6 -0
- package/dist/local-auth/core/node.js +24 -6
- package/dist/local-auth/core/schema/migrations.d.ts +3 -0
- package/dist/local-auth/core/schema/migrations.js +36 -0
- package/dist/local-auth/core/schema/models.js +8 -0
- package/dist/local-auth/core/schema/plugin-definition.d.ts +1 -0
- package/dist/local-auth/core/schema/plugin-definition.js +1 -0
- package/dist/local-auth/core/schema/web-app-schema.d.ts +15 -0
- package/dist/local-auth/core/schema/web-app-schema.js +16 -0
- package/dist/local-auth/core/web.js +8 -1
- package/dist/web/assets/{_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-ChkXxpXe.js → _virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth__mf_owner__1-CKKmnLep.js} +42 -34
- package/dist/web/assets/{dist-DY7ZXvq4.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-Cx7TvZ_H.js} +16717 -373
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-37vlYRxk.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-D3Nvasea.js} +90 -38
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-DRSNXPPo.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-C2GDE8Py.js} +1645 -921
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-DfiQqvVC.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__mf_owner__1__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-CiccpWjh.js} +212 -57
- package/dist/web/assets/auth-CsHp2bQi.js +1 -0
- package/dist/web/assets/common-BGTuTgx7.js +43 -0
- package/dist/web/assets/common-C8_sC5pp.js +70 -0
- package/dist/web/assets/{common-ByxS61u8.js → common-Co5lW_TK.js} +10 -10
- package/dist/web/assets/{common-iHaemino.js → common-CoLuMS7U.js} +6 -6
- package/dist/web/assets/common-Dueu_1NG.js +36 -0
- package/dist/web/assets/{common-TDf_PrjX.js → common-N3skPbzk.js} +10 -10
- package/dist/web/assets/{dist-CrLSslv6.js → dist-DQd1TAJX.js} +273 -132
- package/dist/web/assets/{get-auth-plugin-definition-kDCtXq_6.js → get-auth-plugin-definition-DyokUVjX.js} +3 -3
- package/dist/web/assets/{hostInit-Cruek6c6.js → hostInit-BCYmw0H5.js} +32 -5
- package/dist/web/assets/{mf-entry-bootstrap-0-dfed0275.js → mf-entry-bootstrap-0-3ede9334.js} +2 -1
- package/dist/web/assets/{mf-entry-bootstrap-1-5275674a.js → mf-entry-bootstrap-1-3da85eea.js} +3 -2
- package/dist/web/assets/{mf-entry-bootstrap-2-39fb9255.js → mf-entry-bootstrap-2-32e24e11.js} +3 -2
- package/dist/web/assets/{mf-entry-bootstrap-3-49e64336.js → mf-entry-bootstrap-3-a3cfea9d.js} +3 -2
- package/dist/web/assets/{models-DSvs_3bA.js → models-BcPOQC5p.js} +4 -5
- package/dist/web/assets/{models-BZmCbizK.js → models-BcUgOGGn.js} +11 -6
- package/dist/web/assets/{plugin-definition-CYj29S3q.js → plugin-definition-D1EImXIf.js} +9 -10
- package/dist/web/assets/plugin-definition-lw-gB4hU.js +10 -0
- package/dist/web/assets/{styles-yjbHBTlw.js → styles-EOyEbGA4.js} +9 -10
- package/dist/web/assets/{virtualExposes-CbPBmicF.js → virtualExposes-DWORnjyA.js} +1 -1
- package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-t-KnBiUh.js +747 -0
- package/dist/web/assets/{virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-B6BXIeF1.js → virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-DZfE3QCR.js} +13 -13
- package/dist/web/assets/{web-VqBA3jxZ.js → web-CBVepebK.js} +22 -22
- package/dist/web/assets/{web-D0MSKfyv.js → web-Dgb85jhs.js} +47 -47
- package/dist/web/assets/{web-CXAHKjIY.js → web-EDeSquSP.js} +28 -28
- package/dist/web/assets/{web-1eTcxMhf.js → web-PqAcfBSy.js} +9 -9
- package/dist/web/assets/{web-CDAKPPK9.js → web-RhChfBw_.js} +21 -21
- package/dist/web/assets/web-kaD9AzNS.js +59 -0
- package/dist/web/assets/web-xJ-GnSkC.js +148 -0
- package/dist/web/index.html +5 -5
- package/dist/web/remoteEntry.js +1 -1
- package/package.json +14 -14
- package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-CO5Pvo0y.js +0 -384
- package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-BEZ7A-cz.js +0 -13566
- package/dist/web/assets/auth-BxAE0rgh.js +0 -1
- package/dist/web/assets/common-CKl_XlvH.js +0 -37
- package/dist/web/assets/common-UpVCKZeW.js +0 -41
- package/dist/web/assets/common-crSwCD36.js +0 -37
- package/dist/web/assets/model-utils-C0WDb_Ec.js +0 -1599
- package/dist/web/assets/plugin-definition-DOMmPL2Z.js +0 -11
- package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-XM6iYVxf.js +0 -259
- package/dist/web/assets/virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-DGjg7Brm.js +0 -129
- package/dist/web/assets/web-DbeAaDTV.js +0 -118
- package/dist/web/assets/web-miDovYk_.js +0 -46
- package/dist/web/remoteEntry.ssr.js +0 -43
|
@@ -9,16 +9,20 @@ export declare const moduleGroup: {
|
|
|
9
9
|
}>;
|
|
10
10
|
schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
11
11
|
TPL_ADMIN_ROLES: {};
|
|
12
|
+
TPL_REGISTER_MUTATION: {};
|
|
12
13
|
TPL_USER_OBJECT_TYPE: {};
|
|
13
14
|
}, {
|
|
14
15
|
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
15
16
|
cleanupAuthVerificationQueue: {};
|
|
16
17
|
cleanupAuthVerificationWorker: {};
|
|
17
18
|
cleanupExpiredAuthVerifications: {};
|
|
19
|
+
consumeCodeVerification: {};
|
|
18
20
|
CookieUserSessionService: {};
|
|
19
21
|
createAuthVerification: {};
|
|
22
|
+
createCodeVerification: {};
|
|
20
23
|
userSessionPayload: {};
|
|
21
24
|
validateAuthVerification: {};
|
|
25
|
+
validateCodeVerification: {};
|
|
22
26
|
}>>;
|
|
23
27
|
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
24
28
|
builder: {};
|
|
@@ -34,10 +38,13 @@ export declare const moduleGroup: {
|
|
|
34
38
|
cleanupAuthVerificationQueue: {};
|
|
35
39
|
cleanupAuthVerificationWorker: {};
|
|
36
40
|
cleanupExpiredAuthVerifications: {};
|
|
41
|
+
consumeCodeVerification: {};
|
|
37
42
|
CookieUserSessionService: {};
|
|
38
43
|
createAuthVerification: {};
|
|
44
|
+
createCodeVerification: {};
|
|
39
45
|
userSessionPayload: {};
|
|
40
46
|
validateAuthVerification: {};
|
|
47
|
+
validateCodeVerification: {};
|
|
41
48
|
}>>;
|
|
42
49
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
43
50
|
getConfig: {};
|
|
@@ -152,6 +159,7 @@ export declare const moduleGroup: {
|
|
|
152
159
|
}>;
|
|
153
160
|
};
|
|
154
161
|
export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
162
|
+
constantsOtp: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
|
|
155
163
|
moduleGroup: {
|
|
156
164
|
constantsPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
|
|
157
165
|
schemaPasswordResetMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
@@ -163,16 +171,20 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
|
163
171
|
}>;
|
|
164
172
|
schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
165
173
|
TPL_ADMIN_ROLES: {};
|
|
174
|
+
TPL_REGISTER_MUTATION: {};
|
|
166
175
|
TPL_USER_OBJECT_TYPE: {};
|
|
167
176
|
}, {
|
|
168
177
|
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
169
178
|
cleanupAuthVerificationQueue: {};
|
|
170
179
|
cleanupAuthVerificationWorker: {};
|
|
171
180
|
cleanupExpiredAuthVerifications: {};
|
|
181
|
+
consumeCodeVerification: {};
|
|
172
182
|
CookieUserSessionService: {};
|
|
173
183
|
createAuthVerification: {};
|
|
184
|
+
createCodeVerification: {};
|
|
174
185
|
userSessionPayload: {};
|
|
175
186
|
validateAuthVerification: {};
|
|
187
|
+
validateCodeVerification: {};
|
|
176
188
|
}>>;
|
|
177
189
|
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
178
190
|
builder: {};
|
|
@@ -188,10 +200,13 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
|
188
200
|
cleanupAuthVerificationQueue: {};
|
|
189
201
|
cleanupAuthVerificationWorker: {};
|
|
190
202
|
cleanupExpiredAuthVerifications: {};
|
|
203
|
+
consumeCodeVerification: {};
|
|
191
204
|
CookieUserSessionService: {};
|
|
192
205
|
createAuthVerification: {};
|
|
206
|
+
createCodeVerification: {};
|
|
193
207
|
userSessionPayload: {};
|
|
194
208
|
validateAuthVerification: {};
|
|
209
|
+
validateCodeVerification: {};
|
|
195
210
|
}>>;
|
|
196
211
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
197
212
|
getConfig: {};
|
|
@@ -305,6 +320,25 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
|
305
320
|
servicesEmailVerification: {};
|
|
306
321
|
}>;
|
|
307
322
|
};
|
|
323
|
+
schemaEmailOtpMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
324
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
325
|
+
cleanupAuthVerificationQueue: {};
|
|
326
|
+
cleanupAuthVerificationWorker: {};
|
|
327
|
+
cleanupExpiredAuthVerifications: {};
|
|
328
|
+
consumeCodeVerification: {};
|
|
329
|
+
CookieUserSessionService: {};
|
|
330
|
+
createAuthVerification: {};
|
|
331
|
+
createCodeVerification: {};
|
|
332
|
+
userSessionPayload: {};
|
|
333
|
+
validateAuthVerification: {};
|
|
334
|
+
validateCodeVerification: {};
|
|
335
|
+
}>>;
|
|
336
|
+
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
337
|
+
builder: {};
|
|
338
|
+
}>>;
|
|
339
|
+
}, {
|
|
340
|
+
servicesEmailOtp: {};
|
|
341
|
+
}>;
|
|
308
342
|
schemaEmailVerificationMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
309
343
|
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
310
344
|
builder: {};
|
|
@@ -312,6 +346,97 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
|
312
346
|
}, {
|
|
313
347
|
servicesEmailVerification: {};
|
|
314
348
|
}>;
|
|
349
|
+
schemaInviteMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
350
|
+
TPL_ADMIN_ROLES: {};
|
|
351
|
+
TPL_USER_OBJECT_TYPE: {};
|
|
352
|
+
}, {
|
|
353
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
354
|
+
cleanupAuthVerificationQueue: {};
|
|
355
|
+
cleanupAuthVerificationWorker: {};
|
|
356
|
+
cleanupExpiredAuthVerifications: {};
|
|
357
|
+
consumeCodeVerification: {};
|
|
358
|
+
CookieUserSessionService: {};
|
|
359
|
+
createAuthVerification: {};
|
|
360
|
+
createCodeVerification: {};
|
|
361
|
+
userSessionPayload: {};
|
|
362
|
+
validateAuthVerification: {};
|
|
363
|
+
validateCodeVerification: {};
|
|
364
|
+
}>>;
|
|
365
|
+
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
366
|
+
builder: {};
|
|
367
|
+
}>>;
|
|
368
|
+
}, {
|
|
369
|
+
servicesInvite: {};
|
|
370
|
+
}>;
|
|
371
|
+
servicesEmailOtp: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
372
|
+
TPL_EMAIL_OTP_EMAIL: {};
|
|
373
|
+
TPL_NAME_REQUIRED_CHECK: {};
|
|
374
|
+
}, {
|
|
375
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
376
|
+
cleanupAuthVerificationQueue: {};
|
|
377
|
+
cleanupAuthVerificationWorker: {};
|
|
378
|
+
cleanupExpiredAuthVerifications: {};
|
|
379
|
+
consumeCodeVerification: {};
|
|
380
|
+
CookieUserSessionService: {};
|
|
381
|
+
createAuthVerification: {};
|
|
382
|
+
createCodeVerification: {};
|
|
383
|
+
userSessionPayload: {};
|
|
384
|
+
validateAuthVerification: {};
|
|
385
|
+
validateCodeVerification: {};
|
|
386
|
+
}>>;
|
|
387
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
388
|
+
getConfig: {};
|
|
389
|
+
isDevelopment: {};
|
|
390
|
+
}>>;
|
|
391
|
+
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
392
|
+
BadRequestError: {};
|
|
393
|
+
ForbiddenError: {};
|
|
394
|
+
handleZodRequestValidationError: {};
|
|
395
|
+
HttpError: {};
|
|
396
|
+
InternalServerError: {};
|
|
397
|
+
logError: {};
|
|
398
|
+
NotFoundError: {};
|
|
399
|
+
throwIfPrismaNotFound: {};
|
|
400
|
+
TooManyRequestsError: {};
|
|
401
|
+
UnauthorizedError: {};
|
|
402
|
+
}>>;
|
|
403
|
+
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
404
|
+
prisma: {};
|
|
405
|
+
}>>;
|
|
406
|
+
rateLimitImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
407
|
+
createRateLimiter: {};
|
|
408
|
+
memoizeRateLimiter: {};
|
|
409
|
+
RateLimiter: {
|
|
410
|
+
isTypeOnly: true;
|
|
411
|
+
};
|
|
412
|
+
RateLimiterConfig: {
|
|
413
|
+
isTypeOnly: true;
|
|
414
|
+
};
|
|
415
|
+
RateLimitResult: {
|
|
416
|
+
isTypeOnly: true;
|
|
417
|
+
};
|
|
418
|
+
}>>;
|
|
419
|
+
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
420
|
+
createContextFromRequest: {};
|
|
421
|
+
RequestServiceContext: {
|
|
422
|
+
isTypeOnly: true;
|
|
423
|
+
};
|
|
424
|
+
RequestServiceContextWith: {
|
|
425
|
+
isTypeOnly: true;
|
|
426
|
+
};
|
|
427
|
+
}>>;
|
|
428
|
+
userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
429
|
+
UserSessionPayload: {
|
|
430
|
+
isTypeOnly: true;
|
|
431
|
+
};
|
|
432
|
+
UserSessionService: {
|
|
433
|
+
isTypeOnly: true;
|
|
434
|
+
};
|
|
435
|
+
}>>;
|
|
436
|
+
}, {
|
|
437
|
+
constantsOtp: {};
|
|
438
|
+
constantsPassword: {};
|
|
439
|
+
}>;
|
|
315
440
|
servicesEmailVerification: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
316
441
|
TPL_ACCOUNT_VERIFICATION_EMAIL: {};
|
|
317
442
|
}, {
|
|
@@ -319,10 +444,13 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
|
319
444
|
cleanupAuthVerificationQueue: {};
|
|
320
445
|
cleanupAuthVerificationWorker: {};
|
|
321
446
|
cleanupExpiredAuthVerifications: {};
|
|
447
|
+
consumeCodeVerification: {};
|
|
322
448
|
CookieUserSessionService: {};
|
|
323
449
|
createAuthVerification: {};
|
|
450
|
+
createCodeVerification: {};
|
|
324
451
|
userSessionPayload: {};
|
|
325
452
|
validateAuthVerification: {};
|
|
453
|
+
validateCodeVerification: {};
|
|
326
454
|
}>>;
|
|
327
455
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
328
456
|
getConfig: {};
|
|
@@ -368,5 +496,69 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
|
368
496
|
}, {
|
|
369
497
|
constantsPassword: {};
|
|
370
498
|
}>;
|
|
499
|
+
servicesInvite: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
500
|
+
TPL_INVITE_EMAIL: {};
|
|
501
|
+
}, {
|
|
502
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
503
|
+
cleanupAuthVerificationQueue: {};
|
|
504
|
+
cleanupAuthVerificationWorker: {};
|
|
505
|
+
cleanupExpiredAuthVerifications: {};
|
|
506
|
+
consumeCodeVerification: {};
|
|
507
|
+
CookieUserSessionService: {};
|
|
508
|
+
createAuthVerification: {};
|
|
509
|
+
createCodeVerification: {};
|
|
510
|
+
userSessionPayload: {};
|
|
511
|
+
validateAuthVerification: {};
|
|
512
|
+
validateCodeVerification: {};
|
|
513
|
+
}>>;
|
|
514
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
515
|
+
getConfig: {};
|
|
516
|
+
isDevelopment: {};
|
|
517
|
+
}>>;
|
|
518
|
+
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
519
|
+
BadRequestError: {};
|
|
520
|
+
ForbiddenError: {};
|
|
521
|
+
handleZodRequestValidationError: {};
|
|
522
|
+
HttpError: {};
|
|
523
|
+
InternalServerError: {};
|
|
524
|
+
logError: {};
|
|
525
|
+
NotFoundError: {};
|
|
526
|
+
throwIfPrismaNotFound: {};
|
|
527
|
+
TooManyRequestsError: {};
|
|
528
|
+
UnauthorizedError: {};
|
|
529
|
+
}>>;
|
|
530
|
+
passwordHasherServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
531
|
+
createPasswordHash: {};
|
|
532
|
+
verifyPasswordHash: {};
|
|
533
|
+
}>>;
|
|
534
|
+
prismaGeneratedImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
535
|
+
PrismaClient: {};
|
|
536
|
+
Prisma: {};
|
|
537
|
+
'*': {};
|
|
538
|
+
$Enums: {};
|
|
539
|
+
}>>;
|
|
540
|
+
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
541
|
+
prisma: {};
|
|
542
|
+
}>>;
|
|
543
|
+
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
544
|
+
createContextFromRequest: {};
|
|
545
|
+
RequestServiceContext: {
|
|
546
|
+
isTypeOnly: true;
|
|
547
|
+
};
|
|
548
|
+
RequestServiceContextWith: {
|
|
549
|
+
isTypeOnly: true;
|
|
550
|
+
};
|
|
551
|
+
}>>;
|
|
552
|
+
userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
553
|
+
UserSessionPayload: {
|
|
554
|
+
isTypeOnly: true;
|
|
555
|
+
};
|
|
556
|
+
UserSessionService: {
|
|
557
|
+
isTypeOnly: true;
|
|
558
|
+
};
|
|
559
|
+
}>>;
|
|
560
|
+
}, {
|
|
561
|
+
constantsPassword: {};
|
|
562
|
+
}>;
|
|
371
563
|
};
|
|
372
564
|
//# sourceMappingURL=typed-templates.d.ts.map
|
|
@@ -3,6 +3,15 @@ import { configServiceImportsProvider, errorHandlerServiceImportsProvider, passw
|
|
|
3
3
|
import { rateLimitImportsProvider } from '@baseplate-dev/plugin-rate-limit';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { authModuleImportsProvider } from '#src/local-auth/core/generators/auth-module/generated/ts-import-providers.js';
|
|
6
|
+
const constantsOtp = createTsTemplateFile({
|
|
7
|
+
fileOptions: { kind: 'singleton' },
|
|
8
|
+
importMapProviders: {},
|
|
9
|
+
name: 'constants-otp',
|
|
10
|
+
source: {
|
|
11
|
+
path: path.join(import.meta.dirname, '../templates/module/constants/otp.constants.ts'),
|
|
12
|
+
},
|
|
13
|
+
variables: {},
|
|
14
|
+
});
|
|
6
15
|
const constantsPassword = createTsTemplateFile({
|
|
7
16
|
fileOptions: { kind: 'singleton' },
|
|
8
17
|
group: 'module',
|
|
@@ -41,7 +50,11 @@ const schemaUserPasswordMutations = createTsTemplateFile({
|
|
|
41
50
|
source: {
|
|
42
51
|
path: path.join(import.meta.dirname, '../templates/module/schema/user-password.mutations.ts'),
|
|
43
52
|
},
|
|
44
|
-
variables: {
|
|
53
|
+
variables: {
|
|
54
|
+
TPL_ADMIN_ROLES: {},
|
|
55
|
+
TPL_REGISTER_MUTATION: {},
|
|
56
|
+
TPL_USER_OBJECT_TYPE: {},
|
|
57
|
+
},
|
|
45
58
|
});
|
|
46
59
|
const servicesPasswordReset = createTsTemplateFile({
|
|
47
60
|
fileOptions: { kind: 'singleton' },
|
|
@@ -105,6 +118,19 @@ export const moduleGroup = {
|
|
|
105
118
|
servicesPasswordReset,
|
|
106
119
|
servicesUserPassword,
|
|
107
120
|
};
|
|
121
|
+
const schemaEmailOtpMutations = createTsTemplateFile({
|
|
122
|
+
fileOptions: { kind: 'singleton' },
|
|
123
|
+
importMapProviders: {
|
|
124
|
+
authModuleImports: authModuleImportsProvider,
|
|
125
|
+
pothosImports: pothosImportsProvider,
|
|
126
|
+
},
|
|
127
|
+
name: 'schema-email-otp-mutations',
|
|
128
|
+
referencedGeneratorTemplates: { servicesEmailOtp: {} },
|
|
129
|
+
source: {
|
|
130
|
+
path: path.join(import.meta.dirname, '../templates/module/schema/email-otp.mutations.ts'),
|
|
131
|
+
},
|
|
132
|
+
variables: {},
|
|
133
|
+
});
|
|
108
134
|
const schemaEmailVerificationMutations = createTsTemplateFile({
|
|
109
135
|
fileOptions: { kind: 'singleton' },
|
|
110
136
|
importMapProviders: { pothosImports: pothosImportsProvider },
|
|
@@ -115,6 +141,37 @@ const schemaEmailVerificationMutations = createTsTemplateFile({
|
|
|
115
141
|
},
|
|
116
142
|
variables: {},
|
|
117
143
|
});
|
|
144
|
+
const schemaInviteMutations = createTsTemplateFile({
|
|
145
|
+
fileOptions: { kind: 'singleton' },
|
|
146
|
+
importMapProviders: {
|
|
147
|
+
authModuleImports: authModuleImportsProvider,
|
|
148
|
+
pothosImports: pothosImportsProvider,
|
|
149
|
+
},
|
|
150
|
+
name: 'schema-invite-mutations',
|
|
151
|
+
referencedGeneratorTemplates: { servicesInvite: {} },
|
|
152
|
+
source: {
|
|
153
|
+
path: path.join(import.meta.dirname, '../templates/module/schema/invite.mutations.ts'),
|
|
154
|
+
},
|
|
155
|
+
variables: { TPL_ADMIN_ROLES: {}, TPL_USER_OBJECT_TYPE: {} },
|
|
156
|
+
});
|
|
157
|
+
const servicesEmailOtp = createTsTemplateFile({
|
|
158
|
+
fileOptions: { kind: 'singleton' },
|
|
159
|
+
importMapProviders: {
|
|
160
|
+
authModuleImports: authModuleImportsProvider,
|
|
161
|
+
configServiceImports: configServiceImportsProvider,
|
|
162
|
+
errorHandlerServiceImports: errorHandlerServiceImportsProvider,
|
|
163
|
+
prismaImports: prismaImportsProvider,
|
|
164
|
+
rateLimitImports: rateLimitImportsProvider,
|
|
165
|
+
requestServiceContextImports: requestServiceContextImportsProvider,
|
|
166
|
+
userSessionTypesImports: userSessionTypesImportsProvider,
|
|
167
|
+
},
|
|
168
|
+
name: 'services-email-otp',
|
|
169
|
+
referencedGeneratorTemplates: { constantsOtp: {}, constantsPassword: {} },
|
|
170
|
+
source: {
|
|
171
|
+
path: path.join(import.meta.dirname, '../templates/module/services/email-otp.service.ts'),
|
|
172
|
+
},
|
|
173
|
+
variables: { TPL_EMAIL_OTP_EMAIL: {}, TPL_NAME_REQUIRED_CHECK: {} },
|
|
174
|
+
});
|
|
118
175
|
const servicesEmailVerification = createTsTemplateFile({
|
|
119
176
|
fileOptions: { kind: 'singleton' },
|
|
120
177
|
importMapProviders: {
|
|
@@ -132,9 +189,33 @@ const servicesEmailVerification = createTsTemplateFile({
|
|
|
132
189
|
},
|
|
133
190
|
variables: { TPL_ACCOUNT_VERIFICATION_EMAIL: {} },
|
|
134
191
|
});
|
|
192
|
+
const servicesInvite = createTsTemplateFile({
|
|
193
|
+
fileOptions: { kind: 'singleton' },
|
|
194
|
+
importMapProviders: {
|
|
195
|
+
authModuleImports: authModuleImportsProvider,
|
|
196
|
+
configServiceImports: configServiceImportsProvider,
|
|
197
|
+
errorHandlerServiceImports: errorHandlerServiceImportsProvider,
|
|
198
|
+
passwordHasherServiceImports: passwordHasherServiceImportsProvider,
|
|
199
|
+
prismaGeneratedImports: prismaGeneratedImportsProvider,
|
|
200
|
+
prismaImports: prismaImportsProvider,
|
|
201
|
+
requestServiceContextImports: requestServiceContextImportsProvider,
|
|
202
|
+
userSessionTypesImports: userSessionTypesImportsProvider,
|
|
203
|
+
},
|
|
204
|
+
name: 'services-invite',
|
|
205
|
+
referencedGeneratorTemplates: { constantsPassword: {} },
|
|
206
|
+
source: {
|
|
207
|
+
path: path.join(import.meta.dirname, '../templates/module/services/invite.service.ts'),
|
|
208
|
+
},
|
|
209
|
+
variables: { TPL_INVITE_EMAIL: {} },
|
|
210
|
+
});
|
|
135
211
|
export const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES = {
|
|
212
|
+
constantsOtp,
|
|
136
213
|
moduleGroup,
|
|
214
|
+
schemaEmailOtpMutations,
|
|
137
215
|
schemaEmailVerificationMutations,
|
|
216
|
+
schemaInviteMutations,
|
|
217
|
+
servicesEmailOtp,
|
|
138
218
|
servicesEmailVerification,
|
|
219
|
+
servicesInvite,
|
|
139
220
|
};
|
|
140
221
|
//# sourceMappingURL=typed-templates.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Number of digits in an emailed sign-in code.
|
|
3
|
+
*
|
|
4
|
+
* Six is the length users expect from a one-time code. At this length the
|
|
5
|
+
* keyspace alone is not much of a barrier, so what keeps guessing impractical
|
|
6
|
+
* is the attempt budget below, the endpoint rate limits, and the short expiry.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EMAIL_OTP_LENGTH = 6;
|
|
9
|
+
/**
|
|
10
|
+
* Emailed sign-in code expiration time in seconds (10 minutes)
|
|
11
|
+
*/
|
|
12
|
+
export declare const EMAIL_OTP_EXPIRY_SEC: number;
|
|
13
|
+
/**
|
|
14
|
+
* Maximum number of guesses allowed per emailed sign-in code before it is
|
|
15
|
+
* discarded. A short numeric code needs its own attempt budget on top of the
|
|
16
|
+
* endpoint rate limits.
|
|
17
|
+
*/
|
|
18
|
+
export declare const EMAIL_OTP_MAX_ATTEMPTS = 5;
|
|
19
|
+
//# sourceMappingURL=otp.constants.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* Number of digits in an emailed sign-in code.
|
|
4
|
+
*
|
|
5
|
+
* Six is the length users expect from a one-time code. At this length the
|
|
6
|
+
* keyspace alone is not much of a barrier, so what keeps guessing impractical
|
|
7
|
+
* is the attempt budget below, the endpoint rate limits, and the short expiry.
|
|
8
|
+
*/
|
|
9
|
+
export const EMAIL_OTP_LENGTH = 6;
|
|
10
|
+
/**
|
|
11
|
+
* Emailed sign-in code expiration time in seconds (10 minutes)
|
|
12
|
+
*/
|
|
13
|
+
export const EMAIL_OTP_EXPIRY_SEC = 60 * 10;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum number of guesses allowed per emailed sign-in code before it is
|
|
16
|
+
* discarded. A short numeric code needs its own attempt budget on top of the
|
|
17
|
+
* endpoint rate limits.
|
|
18
|
+
*/
|
|
19
|
+
export const EMAIL_OTP_MAX_ATTEMPTS = 5;
|
|
20
|
+
//# sourceMappingURL=otp.constants.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Number of digits in an emailed sign-in code.
|
|
5
|
+
*
|
|
6
|
+
* Six is the length users expect from a one-time code. At this length the
|
|
7
|
+
* keyspace alone is not much of a barrier, so what keeps guessing impractical
|
|
8
|
+
* is the attempt budget below, the endpoint rate limits, and the short expiry.
|
|
9
|
+
*/
|
|
10
|
+
export const EMAIL_OTP_LENGTH = 6;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Emailed sign-in code expiration time in seconds (10 minutes)
|
|
14
|
+
*/
|
|
15
|
+
export const EMAIL_OTP_EXPIRY_SEC = 60 * 10;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Maximum number of guesses allowed per emailed sign-in code before it is
|
|
19
|
+
* discarded. A short numeric code needs its own attempt budget on top of the
|
|
20
|
+
* endpoint rate limits.
|
|
21
|
+
*/
|
|
22
|
+
export const EMAIL_OTP_MAX_ATTEMPTS = 5;
|
|
@@ -14,4 +14,16 @@ export declare const PASSWORD_RESET_TOKEN_EXPIRY_SEC: number;
|
|
|
14
14
|
* Email verification token expiration time in seconds (24 hours)
|
|
15
15
|
*/
|
|
16
16
|
export declare const EMAIL_VERIFICATION_TOKEN_EXPIRY_SEC: number;
|
|
17
|
+
/**
|
|
18
|
+
* Invite token expiration time in seconds (7 days, since invites are
|
|
19
|
+
* admin-initiated and not tied to a login attempt in progress)
|
|
20
|
+
*/
|
|
21
|
+
export declare const INVITE_TOKEN_EXPIRY_SEC: number;
|
|
22
|
+
/**
|
|
23
|
+
* Safety upper bound on auth verification token length (password reset,
|
|
24
|
+
* invite, etc.), generous relative to the actual token format produced by
|
|
25
|
+
* `generateSplitToken` in `auth-verification.service.ts` so validation
|
|
26
|
+
* doesn't need to track that format exactly.
|
|
27
|
+
*/
|
|
28
|
+
export declare const AUTH_TOKEN_MAX_LENGTH = 100;
|
|
17
29
|
//# sourceMappingURL=password.constants.d.ts.map
|
|
@@ -15,4 +15,16 @@ export const PASSWORD_RESET_TOKEN_EXPIRY_SEC = 60 * 60;
|
|
|
15
15
|
* Email verification token expiration time in seconds (24 hours)
|
|
16
16
|
*/
|
|
17
17
|
export const EMAIL_VERIFICATION_TOKEN_EXPIRY_SEC = 60 * 60 * 24;
|
|
18
|
+
/**
|
|
19
|
+
* Invite token expiration time in seconds (7 days, since invites are
|
|
20
|
+
* admin-initiated and not tied to a login attempt in progress)
|
|
21
|
+
*/
|
|
22
|
+
export const INVITE_TOKEN_EXPIRY_SEC = 60 * 60 * 24 * 7;
|
|
23
|
+
/**
|
|
24
|
+
* Safety upper bound on auth verification token length (password reset,
|
|
25
|
+
* invite, etc.), generous relative to the actual token format produced by
|
|
26
|
+
* `generateSplitToken` in `auth-verification.service.ts` so validation
|
|
27
|
+
* doesn't need to track that format exactly.
|
|
28
|
+
*/
|
|
29
|
+
export const AUTH_TOKEN_MAX_LENGTH = 100;
|
|
18
30
|
//# sourceMappingURL=password.constants.js.map
|
|
@@ -19,3 +19,17 @@ export const PASSWORD_RESET_TOKEN_EXPIRY_SEC = 60 * 60;
|
|
|
19
19
|
* Email verification token expiration time in seconds (24 hours)
|
|
20
20
|
*/
|
|
21
21
|
export const EMAIL_VERIFICATION_TOKEN_EXPIRY_SEC = 60 * 60 * 24;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Invite token expiration time in seconds (7 days, since invites are
|
|
25
|
+
* admin-initiated and not tied to a login attempt in progress)
|
|
26
|
+
*/
|
|
27
|
+
export const INVITE_TOKEN_EXPIRY_SEC = 60 * 60 * 24 * 7;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Safety upper bound on auth verification token length (password reset,
|
|
31
|
+
* invite, etc.), generous relative to the actual token format produced by
|
|
32
|
+
* `generateSplitToken` in `auth-verification.service.ts` so validation
|
|
33
|
+
* doesn't need to track that format exactly.
|
|
34
|
+
*/
|
|
35
|
+
export const AUTH_TOKEN_MAX_LENGTH = 100;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { requestEmailOtp, signInWithEmailOtp } from '$servicesEmailOtp';
|
|
3
|
+
import { userSessionPayload } from '%authModuleImports';
|
|
4
|
+
import { builder } from '%pothosImports';
|
|
5
|
+
builder.mutationField('requestEmailOtp', (t) => t.fieldWithInputPayload({
|
|
6
|
+
authorize: ['public'],
|
|
7
|
+
payload: {
|
|
8
|
+
success: t.payload.field({ type: 'Boolean' }),
|
|
9
|
+
},
|
|
10
|
+
input: {
|
|
11
|
+
email: t.input.field({ required: true, type: 'String' }),
|
|
12
|
+
},
|
|
13
|
+
resolve: async (root, { input }, context) => requestEmailOtp({ email: input.email, context }),
|
|
14
|
+
}));
|
|
15
|
+
builder.mutationField('signInWithEmailOtp', (t) => t.fieldWithInputPayload({
|
|
16
|
+
authorize: ['public'],
|
|
17
|
+
payload: {
|
|
18
|
+
session: t.payload.field({ type: userSessionPayload }),
|
|
19
|
+
},
|
|
20
|
+
input: {
|
|
21
|
+
email: t.input.field({ required: true, type: 'String' }),
|
|
22
|
+
code: t.input.field({ required: true, type: 'String' }),
|
|
23
|
+
name: t.input.field({ required: false, type: 'String' }),
|
|
24
|
+
},
|
|
25
|
+
resolve: async (root, { input }, context) => signInWithEmailOtp({
|
|
26
|
+
input: { ...input, name: input.name ?? undefined },
|
|
27
|
+
context,
|
|
28
|
+
}),
|
|
29
|
+
}));
|
|
30
|
+
//# sourceMappingURL=email-otp.mutations.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import { requestEmailOtp, signInWithEmailOtp } from '$servicesEmailOtp';
|
|
4
|
+
import { userSessionPayload } from '%authModuleImports';
|
|
5
|
+
import { builder } from '%pothosImports';
|
|
6
|
+
|
|
7
|
+
builder.mutationField('requestEmailOtp', (t) =>
|
|
8
|
+
t.fieldWithInputPayload({
|
|
9
|
+
authorize: ['public'],
|
|
10
|
+
payload: {
|
|
11
|
+
success: t.payload.field({ type: 'Boolean' }),
|
|
12
|
+
},
|
|
13
|
+
input: {
|
|
14
|
+
email: t.input.field({ required: true, type: 'String' }),
|
|
15
|
+
},
|
|
16
|
+
resolve: async (root, { input }, context) =>
|
|
17
|
+
requestEmailOtp({ email: input.email, context }),
|
|
18
|
+
}),
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
builder.mutationField('signInWithEmailOtp', (t) =>
|
|
22
|
+
t.fieldWithInputPayload({
|
|
23
|
+
authorize: ['public'],
|
|
24
|
+
payload: {
|
|
25
|
+
session: t.payload.field({ type: userSessionPayload }),
|
|
26
|
+
},
|
|
27
|
+
input: {
|
|
28
|
+
email: t.input.field({ required: true, type: 'String' }),
|
|
29
|
+
code: t.input.field({ required: true, type: 'String' }),
|
|
30
|
+
name: t.input.field({ required: false, type: 'String' }),
|
|
31
|
+
},
|
|
32
|
+
resolve: async (root, { input }, context) =>
|
|
33
|
+
signInWithEmailOtp({
|
|
34
|
+
input: { ...input, name: input.name ?? undefined },
|
|
35
|
+
context,
|
|
36
|
+
}),
|
|
37
|
+
}),
|
|
38
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { acceptInvite, inviteUser, validateInviteToken } from '$servicesInvite';
|
|
3
|
+
import { userSessionPayload } from '%authModuleImports';
|
|
4
|
+
import { builder } from '%pothosImports';
|
|
5
|
+
builder.mutationField('inviteUser', (t) => t.fieldWithInputPayload({
|
|
6
|
+
authorize: TPL_ADMIN_ROLES,
|
|
7
|
+
payload: {
|
|
8
|
+
user: t.payload.field({
|
|
9
|
+
type: TPL_USER_OBJECT_TYPE,
|
|
10
|
+
}),
|
|
11
|
+
},
|
|
12
|
+
input: {
|
|
13
|
+
userId: t.input.field({ required: true, type: 'Uuid' }),
|
|
14
|
+
},
|
|
15
|
+
resolve: async (_root, { input }, context) => inviteUser({ userId: input.userId, context }),
|
|
16
|
+
}));
|
|
17
|
+
builder.mutationField('validateInviteToken', (t) => t.fieldWithInputPayload({
|
|
18
|
+
authorize: ['public'],
|
|
19
|
+
payload: {
|
|
20
|
+
email: t.payload.field({ type: 'String' }),
|
|
21
|
+
},
|
|
22
|
+
input: {
|
|
23
|
+
token: t.input.field({ required: true, type: 'String' }),
|
|
24
|
+
},
|
|
25
|
+
resolve: async (_root, { input }) => validateInviteToken({ token: input.token }),
|
|
26
|
+
}));
|
|
27
|
+
builder.mutationField('acceptInvite', (t) => t.fieldWithInputPayload({
|
|
28
|
+
authorize: ['public'],
|
|
29
|
+
payload: {
|
|
30
|
+
session: t.payload.field({ type: userSessionPayload }),
|
|
31
|
+
},
|
|
32
|
+
input: {
|
|
33
|
+
token: t.input.field({ required: true, type: 'String' }),
|
|
34
|
+
newPassword: t.input.field({ required: true, type: 'String' }),
|
|
35
|
+
},
|
|
36
|
+
resolve: async (_root, { input }, context) => acceptInvite({
|
|
37
|
+
token: input.token,
|
|
38
|
+
newPassword: input.newPassword,
|
|
39
|
+
context,
|
|
40
|
+
}),
|
|
41
|
+
}));
|
|
42
|
+
//# sourceMappingURL=invite.mutations.js.map
|