@baseplate-dev/plugin-auth 0.6.17 → 0.6.19
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 +54 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +74 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +74 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +37 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +37 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +1 -2
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +1 -1
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +74 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +74 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +37 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +74 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +1 -2
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +1 -1
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +37 -0
- package/dist/better-auth/core/node.js +7 -8
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.js +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +20 -3
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +5 -24
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +40 -2
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +19 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js +6 -2
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +20 -1
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js +4 -1
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +16 -8
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts +1 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts +5 -4
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts +1 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js +1 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts +2 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js +2 -1
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts +6 -6
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js +13 -13
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/{use-required-user-id.ts → use-user-id-or-throw.ts} +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +37 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +222 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +37 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +370 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/forgot-password.tsx +1 -4
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +77 -2
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +38 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +38 -1
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +38 -1
- package/dist/better-auth/generators/react/react-better-auth/templates/src/app/auth-loaded-gate.tsx +12 -3
- 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 +593 -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 +602 -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 +307 -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 +294 -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 +68 -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 +74 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +74 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +37 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +37 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +1 -2
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +74 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +74 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +37 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +74 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +1 -2
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +1 -1
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +37 -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 +16 -7
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +73 -16
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +222 -7
- 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 +27 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +71 -4
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +1 -3
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js +1 -2
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +226 -10
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +91 -7
- 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/email-verification.service.js +2 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +5 -3
- 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 +142 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/invite.service.ts +221 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +5 -6
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +8 -5
- 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-hooks/auth-hooks.generator.d.ts +272 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts +547 -4
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts +271 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js +4 -2
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +2 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js +2 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts +548 -6
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js +15 -14
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +7 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +23 -7
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +7 -26
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +65 -4
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +22 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +19 -2
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +10 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +7 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +42 -4
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +24 -13
- 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 +67 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.js +140 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/code-verification.service.ts +191 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +8 -9
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +10 -11
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +39 -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 +1089 -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 +49 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +51 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +918 -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 +155 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/accept-invite.tsx +274 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js +1 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.tsx +1 -1
- 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 +312 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +5 -5
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +6 -12
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +4 -4
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +4 -3
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +1 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js +1 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.tsx +1 -1
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +90 -7
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +38 -1
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts +1 -0
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js +1 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +102 -12
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.js +5 -2
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +54 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.js +35 -1
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js +17 -44
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +21 -49
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts +43 -34
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js +96 -80
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts +148 -82
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +0 -2
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts +0 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts +0 -1
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts +0 -1
- package/dist/local-auth/core/node.js +30 -12
- 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/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +4 -3
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts +2 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js +2 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +4 -4
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +13 -13
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.d.ts +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.ts +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +1 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.d.ts +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.js +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts +0 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/placeholder-auth-module.generator.d.ts +0 -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-DUupKqD4.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-DE4rTqEA.js} +16857 -381
- 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-mszeXpf-.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-CtIleM_e.js} +4095 -2399
- 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-BckLhSjF.js} +212 -57
- package/dist/web/assets/auth-DR6QxrAW.js +1 -0
- package/dist/web/assets/{common-iHaemino.js → common-BsyRiQi3.js} +6 -6
- package/dist/web/assets/{common-TDf_PrjX.js → common-CRwNlCMn.js} +10 -10
- package/dist/web/assets/{common-ByxS61u8.js → common-CvqlRZC9.js} +12 -12
- package/dist/web/assets/common-D3atSs7O.js +70 -0
- package/dist/web/assets/common-DuFyXa6l.js +36 -0
- package/dist/web/assets/common-islduJTj.js +43 -0
- 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-BgWWHl_Y.js} +3 -3
- package/dist/web/assets/{hostInit-Cruek6c6.js → hostInit-DNA4kLRY.js} +32 -5
- package/dist/web/assets/{mf-entry-bootstrap-0-dfed0275.js → mf-entry-bootstrap-0-ea77c09b.js} +2 -1
- package/dist/web/assets/{mf-entry-bootstrap-1-5275674a.js → mf-entry-bootstrap-1-9dee3d8d.js} +3 -2
- package/dist/web/assets/{mf-entry-bootstrap-2-39fb9255.js → mf-entry-bootstrap-2-3179040b.js} +3 -2
- package/dist/web/assets/{mf-entry-bootstrap-3-49e64336.js → mf-entry-bootstrap-3-370d200d.js} +3 -2
- package/dist/web/assets/{models-DSvs_3bA.js → models-BOeSYfRn.js} +4 -5
- package/dist/web/assets/{models-BZmCbizK.js → models-DF6DoXt6.js} +11 -6
- package/dist/web/assets/{plugin-definition-CYj29S3q.js → plugin-definition--k0VAeK3.js} +9 -10
- package/dist/web/assets/plugin-definition-CMwSlxsJ.js +10 -0
- package/dist/web/assets/{styles-yjbHBTlw.js → styles-BQEcQHoR.js} +9 -10
- package/dist/web/assets/{virtualExposes-CbPBmicF.js → virtualExposes-C7fDiAmS.js} +1 -1
- package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-BZBRyml2.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-6SjVUCs8.js} +13 -13
- package/dist/web/assets/web-8wz0ad-V.js +59 -0
- package/dist/web/assets/{web-CXAHKjIY.js → web-BGixH_gT.js} +27 -27
- package/dist/web/assets/{web-1eTcxMhf.js → web-BxIwkN3O.js} +6 -6
- package/dist/web/assets/{web-VqBA3jxZ.js → web-CQMfABjr.js} +24 -24
- package/dist/web/assets/{web-CDAKPPK9.js → web-CcNpItSu.js} +22 -22
- package/dist/web/assets/web-CypPeiVv.js +148 -0
- package/dist/web/assets/{web-D0MSKfyv.js → web-CzK_la2_.js} +53 -53
- package/dist/web/index.html +5 -5
- package/dist/web/remoteEntry.js +1 -1
- package/package.json +14 -14
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts +0 -38
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.js +0 -71
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.ts +0 -77
- 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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { def } from '@baseplate-dev/project-builder-lib';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const createAdminCrudInviteUserActionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{
|
|
4
|
+
id: z.ZodDefault<z.ZodString>;
|
|
5
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
inline: "inline";
|
|
7
|
+
dropdown: "dropdown";
|
|
8
|
+
}>>;
|
|
9
|
+
type: z.ZodLiteral<"invite-user">;
|
|
10
|
+
}, z.core.$loose>;
|
|
11
|
+
export type AdminCrudInviteUserActionDefinition = def.InferOutput<typeof createAdminCrudInviteUserActionSchema>;
|
|
12
|
+
//# sourceMappingURL=invite-user-action.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { baseAdminCrudActionSchema, definitionSchema, } from '@baseplate-dev/project-builder-lib';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const createAdminCrudInviteUserActionSchema = definitionSchema(() => baseAdminCrudActionSchema.extend({
|
|
4
|
+
type: z.literal('invite-user'),
|
|
5
|
+
}));
|
|
6
|
+
//# sourceMappingURL=invite-user-action.js.map
|
|
@@ -25,6 +25,14 @@ export default createPluginModule({
|
|
|
25
25
|
LOCAL_AUTH_MODELS.user,
|
|
26
26
|
getNewAction: () => ({ type: 'reset-password', position: 'dropdown' }),
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
pluginKey,
|
|
30
|
+
name: 'invite-user',
|
|
31
|
+
label: 'Send Invite',
|
|
32
|
+
isAvailableForModel: (definition, modelId) => ModelUtils.byIdOrThrow(definition, modelId).name ===
|
|
33
|
+
LOCAL_AUTH_MODELS.user,
|
|
34
|
+
getNewAction: () => ({ type: 'invite-user', position: 'dropdown' }),
|
|
35
|
+
},
|
|
28
36
|
]);
|
|
29
37
|
adminCrudColumnWeb.columns.add({
|
|
30
38
|
pluginKey,
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { authModelsSpec, createPluginModule, definitionIssueCheckerSpec, pluginConfigSpec, } from '@baseplate-dev/project-builder-lib';
|
|
1
|
+
import { authModelsSpec, createPluginModule, definitionIssueCheckerSpec, pluginConfigSpec, webAppSchemaExtensionSpec, } from '@baseplate-dev/project-builder-lib';
|
|
2
2
|
import { LOCAL_AUTH_MODELS } from '#src/local-auth/constants/model-names.js';
|
|
3
|
+
import { LOCAL_AUTH_PLUGIN_CONFIG_MIGRATIONS } from './schema/migrations.js';
|
|
3
4
|
import { createLocalAuthPluginDefinitionSchema } from './schema/plugin-definition.js';
|
|
4
5
|
import { createLocalAuthSchemaChecker } from './schema/schema-issue-checker.js';
|
|
6
|
+
import { createLocalAuthWebAppSchema } from './schema/web-app-schema.js';
|
|
5
7
|
export default createPluginModule({
|
|
6
8
|
name: 'common',
|
|
7
9
|
dependencies: {
|
|
8
10
|
pluginConfig: pluginConfigSpec,
|
|
9
11
|
authModels: authModelsSpec,
|
|
10
12
|
issueCheckers: definitionIssueCheckerSpec,
|
|
13
|
+
webAppSchemaExtension: webAppSchemaExtensionSpec,
|
|
11
14
|
},
|
|
12
|
-
initialize: ({ pluginConfig, authModels, issueCheckers }, { pluginKey }) => {
|
|
15
|
+
initialize: ({ pluginConfig, authModels, issueCheckers, webAppSchemaExtension }, { pluginKey }) => {
|
|
13
16
|
pluginConfig.schemas.set(pluginKey, createLocalAuthPluginDefinitionSchema);
|
|
17
|
+
pluginConfig.migrations.set(pluginKey, LOCAL_AUTH_PLUGIN_CONFIG_MIGRATIONS);
|
|
14
18
|
authModels.getAuthModels.set(() => ({
|
|
15
19
|
user: LOCAL_AUTH_MODELS.user,
|
|
16
20
|
}));
|
|
17
21
|
issueCheckers.checkers.set(pluginKey, createLocalAuthSchemaChecker(pluginKey));
|
|
22
|
+
webAppSchemaExtension.schemas.set(pluginKey, createLocalAuthWebAppSchema);
|
|
18
23
|
},
|
|
19
24
|
});
|
|
20
25
|
//# sourceMappingURL=common.js.map
|
|
@@ -26,6 +26,7 @@ export function LocalAuthDefinitionEditor({ definition: pluginMetadata, metadata
|
|
|
26
26
|
return {
|
|
27
27
|
additionalUserAdminRoles: [],
|
|
28
28
|
requireNameOnRegistration: false,
|
|
29
|
+
emailOtp: false,
|
|
29
30
|
};
|
|
30
31
|
}, [pluginMetadata?.config]);
|
|
31
32
|
const form = useResettableForm({
|
|
@@ -58,6 +59,6 @@ export function LocalAuthDefinitionEditor({ definition: pluginMetadata, metadata
|
|
|
58
59
|
useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
|
|
59
60
|
return (_jsxs("div", { className: "auth:relative auth:flex auth:h-full auth:flex-1 auth:flex-col auth:gap-4 auth:overflow-hidden", children: [_jsx(AuthConfigTabs, {}), _jsx("div", { className: "auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto", style: {
|
|
60
61
|
'--action-bar-height': '52px',
|
|
61
|
-
}, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsxs(SectionList, { children: [_jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Local Auth User Models" }), _jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(DefinitionDiffAlert, { diff: diff }) })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "User Management Permissions" }), _jsx(SectionListSectionDescription, { children: "The \"admin\" role always has user management permissions. Optionally add more roles that can manage users and assign roles in the admin interface." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(MultiComboboxFieldController, { label: "Additional User Admin Roles", name: "additionalUserAdminRoles", control: control, options: roles, description: "Additional roles (beyond admin) that can manage users and assign roles." }) })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Registration Settings" }), _jsx(SectionListSectionDescription, { children: "Configure what information is collected during user registration." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(SwitchFieldController, { label: "Require Name on Registration", name: "requireNameOnRegistration", control: control, description: "When enabled, users must provide their name when registering." }) })] })] }) }), _jsx(FormActionBar, { form: form, allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges })] }) })] }));
|
|
62
|
+
}, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsxs(SectionList, { children: [_jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Local Auth User Models" }), _jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(DefinitionDiffAlert, { diff: diff }) })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "User Management Permissions" }), _jsx(SectionListSectionDescription, { children: "The \"admin\" role always has user management permissions. Optionally add more roles that can manage users and assign roles in the admin interface." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(MultiComboboxFieldController, { label: "Additional User Admin Roles", name: "additionalUserAdminRoles", control: control, options: roles, description: "Additional roles (beyond admin) that can manage users and assign roles." }) })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Registration Settings" }), _jsx(SectionListSectionDescription, { children: "Configure what information is collected during user registration." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(SwitchFieldController, { label: "Require Name on Registration", name: "requireNameOnRegistration", control: control, description: "When enabled, users must provide their name when registering." }) })] }), _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Sign-in Methods" }), _jsx(SectionListSectionDescription, { children: "Choose how users can sign in, in addition to email and password." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(SwitchFieldController, { label: "Email Sign-in Codes", name: "emailOtp", control: control, description: "When enabled, users can sign in with a single-use code emailed to them instead of a password. Signing in with a code creates an account if the address is new." }) })] })] }) }), _jsx(FormActionBar, { form: form, allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges })] }) })] }));
|
|
62
63
|
}
|
|
63
64
|
//# sourceMappingURL=local-auth-definition-editor.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WebAppSettingsFormProps } from '@baseplate-dev/project-builder-lib/web';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the local-auth per-app settings (disable registration toggle) in
|
|
5
|
+
* the web app settings page. Bound to `pluginData[pluginKey]` on the shared
|
|
6
|
+
* web app form.
|
|
7
|
+
*/
|
|
8
|
+
export declare function LocalAuthWebAppSettingsForm({ formProps, pluginKey, }: WebAppSettingsFormProps): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=local-auth-web-app-settings-form.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SwitchFieldController } from '@baseplate-dev/ui-components';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the local-auth per-app settings (disable registration toggle) in
|
|
5
|
+
* the web app settings page. Bound to `pluginData[pluginKey]` on the shared
|
|
6
|
+
* web app form.
|
|
7
|
+
*/
|
|
8
|
+
export function LocalAuthWebAppSettingsForm({ formProps, pluginKey, }) {
|
|
9
|
+
return (_jsx(SwitchFieldController, { label: "Disable Registration", description: "When enabled, this site's sign-up page and link are hidden so users can only be added via an invite.", control: formProps.control, name: `pluginData.${pluginKey}.disableRegistration` }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=local-auth-web-app-settings-form.js.map
|
package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const authEmailPasswordGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{
|
|
5
5
|
adminRoles: string[];
|
|
6
|
-
|
|
6
|
+
webAppName: string;
|
|
7
7
|
requireNameOnRegistration: boolean;
|
|
8
|
+
emailOtp?: boolean | undefined;
|
|
9
|
+
disableRegistration?: boolean | undefined;
|
|
8
10
|
}, {
|
|
9
11
|
paths: import("@baseplate-dev/sync").GeneratorTask<{
|
|
10
12
|
localAuthCoreAuthEmailPasswordPaths: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-paths.js").LocalAuthCoreAuthEmailPasswordPaths>;
|
|
@@ -14,7 +16,6 @@ export declare const authEmailPasswordGenerator: import("@baseplate-dev/sync").G
|
|
|
14
16
|
imports: import("@baseplate-dev/sync").GeneratorTask<{
|
|
15
17
|
authEmailPasswordImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
16
18
|
authenticateUserWithEmailAndPassword: {};
|
|
17
|
-
cleanupExpiredPasswordResetTokens: {};
|
|
18
19
|
completePasswordReset: {};
|
|
19
20
|
createUserWithEmailAndPassword: {};
|
|
20
21
|
PASSWORD_MAX_LENGTH: {};
|
|
@@ -30,14 +31,26 @@ export declare const authEmailPasswordGenerator: import("@baseplate-dev/sync").G
|
|
|
30
31
|
renderers: import("@baseplate-dev/sync").GeneratorTask<{
|
|
31
32
|
localAuthCoreAuthEmailPasswordRenderers: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-renderers.js").LocalAuthCoreAuthEmailPasswordRenderers>;
|
|
32
33
|
}, {
|
|
34
|
+
appUrlsImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
35
|
+
getApiUrl: {};
|
|
36
|
+
getWebAppForUrl: {};
|
|
37
|
+
getWebOrigins: {};
|
|
38
|
+
getWebUrl: {};
|
|
39
|
+
WebAppName: {
|
|
40
|
+
isTypeOnly: true;
|
|
41
|
+
};
|
|
42
|
+
}>>;
|
|
33
43
|
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
34
44
|
cleanupAuthVerificationQueue: {};
|
|
35
45
|
cleanupAuthVerificationWorker: {};
|
|
36
46
|
cleanupExpiredAuthVerifications: {};
|
|
47
|
+
consumeCodeVerification: {};
|
|
37
48
|
CookieUserSessionService: {};
|
|
38
49
|
createAuthVerification: {};
|
|
50
|
+
createCodeVerification: {};
|
|
39
51
|
userSessionPayload: {};
|
|
40
52
|
validateAuthVerification: {};
|
|
53
|
+
validateCodeVerification: {};
|
|
41
54
|
}>>;
|
|
42
55
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
43
56
|
getConfig: {};
|
|
@@ -104,16 +117,12 @@ export declare const authEmailPasswordGenerator: import("@baseplate-dev/sync").G
|
|
|
104
117
|
};
|
|
105
118
|
}>>;
|
|
106
119
|
}, undefined>;
|
|
107
|
-
config: import("@baseplate-dev/sync").GeneratorTask<undefined, {
|
|
108
|
-
provider: import("@baseplate-dev/sync").ProviderType<Omit<import("@baseplate-dev/utils").FieldMap<{
|
|
109
|
-
configFields: import("@baseplate-dev/utils").MapContainer<string, import("@baseplate-dev/fastify-generators").ConfigServiceField>;
|
|
110
|
-
}>, "getValues">>;
|
|
111
|
-
}, undefined>;
|
|
112
120
|
appModule: import("@baseplate-dev/sync").GeneratorTask<any, {
|
|
113
121
|
paths: import("@baseplate-dev/sync").ProviderType<import("./generated/template-paths.js").LocalAuthCoreAuthEmailPasswordPaths>;
|
|
114
122
|
appModule: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/fastify-generators").AppModuleProvider>;
|
|
115
123
|
}, any>;
|
|
116
124
|
main: import("@baseplate-dev/sync").GeneratorTask<any, {
|
|
125
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./generated/template-paths.js").LocalAuthCoreAuthEmailPasswordPaths>;
|
|
117
126
|
renderers: import("@baseplate-dev/sync").ProviderType<import("./generated/template-renderers.js").LocalAuthCoreAuthEmailPasswordRenderers>;
|
|
118
127
|
transactionalLibConfig: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/plugin-email").TransactionalLibConfigProvider>;
|
|
119
128
|
userObjectType: import("@baseplate-dev/sync").ProviderDependency<import("@baseplate-dev/fastify-generators").PothosTypeOutputProvider>;
|
package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { tsCodeFragment, TsCodeUtils } from '@baseplate-dev/core-generators';
|
|
2
|
-
import { appModuleProvider,
|
|
1
|
+
import { tsCodeFragment, TsCodeUtils, tsImportBuilder, } from '@baseplate-dev/core-generators';
|
|
2
|
+
import { appModuleProvider, createPothosPrismaObjectTypeOutputName, pothosTypeOutputProvider, } from '@baseplate-dev/fastify-generators';
|
|
3
3
|
import { transactionalLibConfigProvider } from '@baseplate-dev/plugin-email';
|
|
4
|
-
import { createGenerator, createGeneratorTask
|
|
4
|
+
import { createGenerator, createGeneratorTask } from '@baseplate-dev/sync';
|
|
5
5
|
import { quot } from '@baseplate-dev/utils';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { LOCAL_AUTH_MODELS } from '#src/local-auth/constants/model-names.js';
|
|
8
8
|
import { LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED as GENERATED_TEMPLATES } from './generated/index.js';
|
|
9
9
|
const descriptorSchema = z.object({
|
|
10
10
|
adminRoles: z.array(z.string()),
|
|
11
|
-
|
|
11
|
+
/** Web app the links in auth emails point at. */
|
|
12
|
+
webAppName: z.string(),
|
|
12
13
|
requireNameOnRegistration: z.boolean(),
|
|
14
|
+
emailOtp: z.boolean().default(false),
|
|
15
|
+
disableRegistration: z.boolean().default(false),
|
|
13
16
|
});
|
|
14
17
|
/**
|
|
15
18
|
* Sets up email / password authentication
|
|
@@ -18,45 +21,72 @@ export const authEmailPasswordGenerator = createGenerator({
|
|
|
18
21
|
name: 'local-auth/core/auth-email-password',
|
|
19
22
|
generatorFileUrl: import.meta.url,
|
|
20
23
|
descriptorSchema,
|
|
21
|
-
buildTasks: ({ adminRoles,
|
|
24
|
+
buildTasks: ({ adminRoles, webAppName, requireNameOnRegistration, emailOtp, disableRegistration, }) => ({
|
|
22
25
|
paths: GENERATED_TEMPLATES.paths.task,
|
|
23
26
|
imports: GENERATED_TEMPLATES.imports.task,
|
|
24
27
|
renderers: GENERATED_TEMPLATES.renderers.task,
|
|
25
|
-
config: createProviderTask(configServiceProvider, (configService) => {
|
|
26
|
-
configService.configFields.set('AUTH_FRONTEND_URL', {
|
|
27
|
-
validator: tsCodeFragment('z.url()'),
|
|
28
|
-
comment: 'Frontend URL for authentication flows including password reset and email verification (e.g., https://app.example.com)',
|
|
29
|
-
exampleValue: `http://localhost:${devWebDomainPort}`,
|
|
30
|
-
});
|
|
31
|
-
}),
|
|
32
28
|
appModule: createGeneratorTask({
|
|
33
29
|
dependencies: {
|
|
34
30
|
paths: GENERATED_TEMPLATES.paths.provider,
|
|
35
31
|
appModule: appModuleProvider,
|
|
36
32
|
},
|
|
37
33
|
run({ paths, appModule }) {
|
|
38
|
-
appModule.moduleImports.push(paths.schemaUserPasswordMutations, paths.schemaPasswordResetMutations, paths.schemaEmailVerificationMutations);
|
|
34
|
+
appModule.moduleImports.push(paths.schemaUserPasswordMutations, paths.schemaPasswordResetMutations, paths.schemaInviteMutations, paths.schemaEmailVerificationMutations);
|
|
35
|
+
if (emailOtp) {
|
|
36
|
+
appModule.moduleImports.push(paths.schemaEmailOtpMutations);
|
|
37
|
+
}
|
|
39
38
|
},
|
|
40
39
|
}),
|
|
41
40
|
main: createGeneratorTask({
|
|
42
41
|
dependencies: {
|
|
42
|
+
paths: GENERATED_TEMPLATES.paths.provider,
|
|
43
43
|
renderers: GENERATED_TEMPLATES.renderers.provider,
|
|
44
44
|
transactionalLibConfig: transactionalLibConfigProvider,
|
|
45
45
|
userObjectType: pothosTypeOutputProvider
|
|
46
46
|
.dependency()
|
|
47
47
|
.reference(createPothosPrismaObjectTypeOutputName(LOCAL_AUTH_MODELS.user)),
|
|
48
48
|
},
|
|
49
|
-
run({ renderers, transactionalLibConfig, userObjectType }) {
|
|
49
|
+
run({ paths, renderers, transactionalLibConfig, userObjectType }) {
|
|
50
50
|
const transactionalLibPackageName = transactionalLibConfig.getTransactionalLibPackageName();
|
|
51
|
+
const adminRolesFragment = TsCodeUtils.mergeFragmentsAsArrayPresorted(adminRoles.map((r) => quot(r)).toSorted());
|
|
52
|
+
const userObjectTypeFragment = userObjectType.getTypeReference().fragment;
|
|
53
|
+
// Kept as its own fragment (rather than a separate mutations file)
|
|
54
|
+
// since the backend serves every web app, and only one field needs
|
|
55
|
+
// to disappear when every web app has registration disabled.
|
|
56
|
+
const registerMutationFragment = disableRegistration
|
|
57
|
+
? ''
|
|
58
|
+
: tsCodeFragment(`builder.mutationField('registerWithEmailPassword', (t) =>
|
|
59
|
+
t.fieldWithInputPayload({
|
|
60
|
+
authorize: ['public'],
|
|
61
|
+
payload: {
|
|
62
|
+
session: t.payload.field({ type: userSessionPayload }),
|
|
63
|
+
},
|
|
64
|
+
input: {
|
|
65
|
+
email: t.input.field({ required: true, type: 'String' }),
|
|
66
|
+
name: t.input.field({ required: false, type: 'String' }),
|
|
67
|
+
password: t.input.field({ required: true, type: 'String' }),
|
|
68
|
+
},
|
|
69
|
+
resolve: async (root, { input }, context) =>
|
|
70
|
+
registerUserWithEmailAndPassword({
|
|
71
|
+
input: {
|
|
72
|
+
...input,
|
|
73
|
+
name: input.name ?? undefined,
|
|
74
|
+
},
|
|
75
|
+
context,
|
|
76
|
+
}),
|
|
77
|
+
}),
|
|
78
|
+
);`, tsImportBuilder(['registerUserWithEmailAndPassword']).from(paths.servicesUserPassword));
|
|
51
79
|
return {
|
|
52
80
|
build: async (builder) => {
|
|
53
81
|
await builder.apply(renderers.moduleGroup.render({
|
|
54
82
|
variables: {
|
|
55
83
|
schemaUserPasswordMutations: {
|
|
56
|
-
TPL_ADMIN_ROLES:
|
|
57
|
-
|
|
84
|
+
TPL_ADMIN_ROLES: adminRolesFragment,
|
|
85
|
+
TPL_REGISTER_MUTATION: registerMutationFragment,
|
|
86
|
+
TPL_USER_OBJECT_TYPE: userObjectTypeFragment,
|
|
58
87
|
},
|
|
59
88
|
servicesPasswordReset: {
|
|
89
|
+
TPL_AUTH_WEB_APP: quot(webAppName),
|
|
60
90
|
TPL_PASSWORD_RESET_EMAIL: TsCodeUtils.importFragment('PasswordResetEmail', transactionalLibPackageName),
|
|
61
91
|
TPL_PASSWORD_CHANGED_EMAIL: TsCodeUtils.importFragment('PasswordChangedEmail', transactionalLibPackageName),
|
|
62
92
|
},
|
|
@@ -67,12 +97,39 @@ export const authEmailPasswordGenerator = createGenerator({
|
|
|
67
97
|
},
|
|
68
98
|
},
|
|
69
99
|
}));
|
|
100
|
+
await builder.apply(renderers.servicesInvite.render({
|
|
101
|
+
variables: {
|
|
102
|
+
TPL_AUTH_WEB_APP: quot(webAppName),
|
|
103
|
+
TPL_INVITE_EMAIL: TsCodeUtils.importFragment('InviteEmail', transactionalLibPackageName),
|
|
104
|
+
},
|
|
105
|
+
}));
|
|
106
|
+
await builder.apply(renderers.schemaInviteMutations.render({
|
|
107
|
+
variables: {
|
|
108
|
+
TPL_ADMIN_ROLES: adminRolesFragment,
|
|
109
|
+
TPL_USER_OBJECT_TYPE: userObjectTypeFragment,
|
|
110
|
+
},
|
|
111
|
+
}));
|
|
70
112
|
await builder.apply(renderers.servicesEmailVerification.render({
|
|
71
113
|
variables: {
|
|
114
|
+
TPL_AUTH_WEB_APP: quot(webAppName),
|
|
72
115
|
TPL_ACCOUNT_VERIFICATION_EMAIL: TsCodeUtils.importFragment('AccountVerificationEmail', transactionalLibPackageName),
|
|
73
116
|
},
|
|
74
117
|
}));
|
|
75
118
|
await builder.apply(renderers.schemaEmailVerificationMutations.render({}));
|
|
119
|
+
if (emailOtp) {
|
|
120
|
+
await builder.apply(renderers.constantsOtp.render({}));
|
|
121
|
+
await builder.apply(renderers.servicesEmailOtp.render({
|
|
122
|
+
variables: {
|
|
123
|
+
TPL_EMAIL_OTP_EMAIL: TsCodeUtils.importFragment('EmailOtpEmail', transactionalLibPackageName),
|
|
124
|
+
// The user lookup lives inside the fragment so it is not
|
|
125
|
+
// left unused when names are not required.
|
|
126
|
+
TPL_NAME_REQUIRED_CHECK: requireNameOnRegistration
|
|
127
|
+
? tsCodeFragment("const existingUser = await prisma.user.findUnique({\n where: { email },\n select: { id: true },\n });\n\n if (!existingUser && !name) {\n throw new BadRequestError('Name is required', 'name-required');\n }")
|
|
128
|
+
: '',
|
|
129
|
+
},
|
|
130
|
+
}));
|
|
131
|
+
await builder.apply(renderers.schemaEmailOtpMutations.render({}));
|
|
132
|
+
}
|
|
76
133
|
},
|
|
77
134
|
};
|
|
78
135
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
2
2
|
imports: {
|
|
3
|
+
generatorName: string;
|
|
3
4
|
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
4
5
|
authEmailPasswordImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
5
6
|
authenticateUserWithEmailAndPassword: {};
|
|
6
|
-
cleanupExpiredPasswordResetTokens: {};
|
|
7
7
|
completePasswordReset: {};
|
|
8
8
|
createUserWithEmailAndPassword: {};
|
|
9
9
|
PASSWORD_MAX_LENGTH: {};
|
|
@@ -30,14 +30,26 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
30
30
|
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
31
31
|
localAuthCoreAuthEmailPasswordRenderers: import("@baseplate-dev/sync").ProviderExport<import("./template-renderers.js").LocalAuthCoreAuthEmailPasswordRenderers>;
|
|
32
32
|
}, {
|
|
33
|
+
appUrlsImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
34
|
+
getApiUrl: {};
|
|
35
|
+
getWebAppForUrl: {};
|
|
36
|
+
getWebOrigins: {};
|
|
37
|
+
getWebUrl: {};
|
|
38
|
+
WebAppName: {
|
|
39
|
+
isTypeOnly: true;
|
|
40
|
+
};
|
|
41
|
+
}>>;
|
|
33
42
|
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
34
43
|
cleanupAuthVerificationQueue: {};
|
|
35
44
|
cleanupAuthVerificationWorker: {};
|
|
36
45
|
cleanupExpiredAuthVerifications: {};
|
|
46
|
+
consumeCodeVerification: {};
|
|
37
47
|
CookieUserSessionService: {};
|
|
38
48
|
createAuthVerification: {};
|
|
49
|
+
createCodeVerification: {};
|
|
39
50
|
userSessionPayload: {};
|
|
40
51
|
validateAuthVerification: {};
|
|
52
|
+
validateCodeVerification: {};
|
|
41
53
|
}>>;
|
|
42
54
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
43
55
|
getConfig: {};
|
|
@@ -106,6 +118,7 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
106
118
|
}, undefined>;
|
|
107
119
|
};
|
|
108
120
|
templates: {
|
|
121
|
+
constantsOtp: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
|
|
109
122
|
moduleGroup: {
|
|
110
123
|
constantsPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}, Record<never, Record<never, never>>>;
|
|
111
124
|
schemaPasswordResetMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
@@ -117,16 +130,20 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
117
130
|
}>;
|
|
118
131
|
schemaUserPasswordMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
119
132
|
TPL_ADMIN_ROLES: {};
|
|
133
|
+
TPL_REGISTER_MUTATION: {};
|
|
120
134
|
TPL_USER_OBJECT_TYPE: {};
|
|
121
135
|
}, {
|
|
122
136
|
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
123
137
|
cleanupAuthVerificationQueue: {};
|
|
124
138
|
cleanupAuthVerificationWorker: {};
|
|
125
139
|
cleanupExpiredAuthVerifications: {};
|
|
140
|
+
consumeCodeVerification: {};
|
|
126
141
|
CookieUserSessionService: {};
|
|
127
142
|
createAuthVerification: {};
|
|
143
|
+
createCodeVerification: {};
|
|
128
144
|
userSessionPayload: {};
|
|
129
145
|
validateAuthVerification: {};
|
|
146
|
+
validateCodeVerification: {};
|
|
130
147
|
}>>;
|
|
131
148
|
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
132
149
|
builder: {};
|
|
@@ -135,21 +152,30 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
135
152
|
servicesUserPassword: {};
|
|
136
153
|
}>;
|
|
137
154
|
servicesPasswordReset: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
155
|
+
TPL_AUTH_WEB_APP: {};
|
|
138
156
|
TPL_PASSWORD_CHANGED_EMAIL: {};
|
|
139
157
|
TPL_PASSWORD_RESET_EMAIL: {};
|
|
140
158
|
}, {
|
|
159
|
+
appUrlsImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
160
|
+
getApiUrl: {};
|
|
161
|
+
getWebAppForUrl: {};
|
|
162
|
+
getWebOrigins: {};
|
|
163
|
+
getWebUrl: {};
|
|
164
|
+
WebAppName: {
|
|
165
|
+
isTypeOnly: true;
|
|
166
|
+
};
|
|
167
|
+
}>>;
|
|
141
168
|
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
142
169
|
cleanupAuthVerificationQueue: {};
|
|
143
170
|
cleanupAuthVerificationWorker: {};
|
|
144
171
|
cleanupExpiredAuthVerifications: {};
|
|
172
|
+
consumeCodeVerification: {};
|
|
145
173
|
CookieUserSessionService: {};
|
|
146
174
|
createAuthVerification: {};
|
|
175
|
+
createCodeVerification: {};
|
|
147
176
|
userSessionPayload: {};
|
|
148
177
|
validateAuthVerification: {};
|
|
149
|
-
|
|
150
|
-
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
151
|
-
getConfig: {};
|
|
152
|
-
isDevelopment: {};
|
|
178
|
+
validateCodeVerification: {};
|
|
153
179
|
}>>;
|
|
154
180
|
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
155
181
|
BadRequestError: {};
|
|
@@ -259,6 +285,25 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
259
285
|
servicesEmailVerification: {};
|
|
260
286
|
}>;
|
|
261
287
|
};
|
|
288
|
+
schemaEmailOtpMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
289
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
290
|
+
cleanupAuthVerificationQueue: {};
|
|
291
|
+
cleanupAuthVerificationWorker: {};
|
|
292
|
+
cleanupExpiredAuthVerifications: {};
|
|
293
|
+
consumeCodeVerification: {};
|
|
294
|
+
CookieUserSessionService: {};
|
|
295
|
+
createAuthVerification: {};
|
|
296
|
+
createCodeVerification: {};
|
|
297
|
+
userSessionPayload: {};
|
|
298
|
+
validateAuthVerification: {};
|
|
299
|
+
validateCodeVerification: {};
|
|
300
|
+
}>>;
|
|
301
|
+
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
302
|
+
builder: {};
|
|
303
|
+
}>>;
|
|
304
|
+
}, {
|
|
305
|
+
servicesEmailOtp: {};
|
|
306
|
+
}>;
|
|
262
307
|
schemaEmailVerificationMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
263
308
|
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
264
309
|
builder: {};
|
|
@@ -266,17 +311,43 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
266
311
|
}, {
|
|
267
312
|
servicesEmailVerification: {};
|
|
268
313
|
}>;
|
|
269
|
-
|
|
270
|
-
|
|
314
|
+
schemaInviteMutations: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
315
|
+
TPL_ADMIN_ROLES: {};
|
|
316
|
+
TPL_USER_OBJECT_TYPE: {};
|
|
317
|
+
}, {
|
|
318
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
319
|
+
cleanupAuthVerificationQueue: {};
|
|
320
|
+
cleanupAuthVerificationWorker: {};
|
|
321
|
+
cleanupExpiredAuthVerifications: {};
|
|
322
|
+
consumeCodeVerification: {};
|
|
323
|
+
CookieUserSessionService: {};
|
|
324
|
+
createAuthVerification: {};
|
|
325
|
+
createCodeVerification: {};
|
|
326
|
+
userSessionPayload: {};
|
|
327
|
+
validateAuthVerification: {};
|
|
328
|
+
validateCodeVerification: {};
|
|
329
|
+
}>>;
|
|
330
|
+
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
331
|
+
builder: {};
|
|
332
|
+
}>>;
|
|
333
|
+
}, {
|
|
334
|
+
servicesInvite: {};
|
|
335
|
+
}>;
|
|
336
|
+
servicesEmailOtp: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
337
|
+
TPL_EMAIL_OTP_EMAIL: {};
|
|
338
|
+
TPL_NAME_REQUIRED_CHECK: {};
|
|
271
339
|
}, {
|
|
272
340
|
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
273
341
|
cleanupAuthVerificationQueue: {};
|
|
274
342
|
cleanupAuthVerificationWorker: {};
|
|
275
343
|
cleanupExpiredAuthVerifications: {};
|
|
344
|
+
consumeCodeVerification: {};
|
|
276
345
|
CookieUserSessionService: {};
|
|
277
346
|
createAuthVerification: {};
|
|
347
|
+
createCodeVerification: {};
|
|
278
348
|
userSessionPayload: {};
|
|
279
349
|
validateAuthVerification: {};
|
|
350
|
+
validateCodeVerification: {};
|
|
280
351
|
}>>;
|
|
281
352
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
282
353
|
getConfig: {};
|
|
@@ -319,6 +390,150 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
319
390
|
isTypeOnly: true;
|
|
320
391
|
};
|
|
321
392
|
}>>;
|
|
393
|
+
userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
394
|
+
UserSessionPayload: {
|
|
395
|
+
isTypeOnly: true;
|
|
396
|
+
};
|
|
397
|
+
UserSessionService: {
|
|
398
|
+
isTypeOnly: true;
|
|
399
|
+
};
|
|
400
|
+
}>>;
|
|
401
|
+
}, {
|
|
402
|
+
constantsOtp: {};
|
|
403
|
+
constantsPassword: {};
|
|
404
|
+
}>;
|
|
405
|
+
servicesEmailVerification: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
406
|
+
TPL_ACCOUNT_VERIFICATION_EMAIL: {};
|
|
407
|
+
TPL_AUTH_WEB_APP: {};
|
|
408
|
+
}, {
|
|
409
|
+
appUrlsImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
410
|
+
getApiUrl: {};
|
|
411
|
+
getWebAppForUrl: {};
|
|
412
|
+
getWebOrigins: {};
|
|
413
|
+
getWebUrl: {};
|
|
414
|
+
WebAppName: {
|
|
415
|
+
isTypeOnly: true;
|
|
416
|
+
};
|
|
417
|
+
}>>;
|
|
418
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
419
|
+
cleanupAuthVerificationQueue: {};
|
|
420
|
+
cleanupAuthVerificationWorker: {};
|
|
421
|
+
cleanupExpiredAuthVerifications: {};
|
|
422
|
+
consumeCodeVerification: {};
|
|
423
|
+
CookieUserSessionService: {};
|
|
424
|
+
createAuthVerification: {};
|
|
425
|
+
createCodeVerification: {};
|
|
426
|
+
userSessionPayload: {};
|
|
427
|
+
validateAuthVerification: {};
|
|
428
|
+
validateCodeVerification: {};
|
|
429
|
+
}>>;
|
|
430
|
+
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
431
|
+
BadRequestError: {};
|
|
432
|
+
ForbiddenError: {};
|
|
433
|
+
handleZodRequestValidationError: {};
|
|
434
|
+
HttpError: {};
|
|
435
|
+
InternalServerError: {};
|
|
436
|
+
logError: {};
|
|
437
|
+
NotFoundError: {};
|
|
438
|
+
throwIfPrismaNotFound: {};
|
|
439
|
+
TooManyRequestsError: {};
|
|
440
|
+
UnauthorizedError: {};
|
|
441
|
+
}>>;
|
|
442
|
+
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
443
|
+
prisma: {};
|
|
444
|
+
}>>;
|
|
445
|
+
rateLimitImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
446
|
+
createRateLimiter: {};
|
|
447
|
+
memoizeRateLimiter: {};
|
|
448
|
+
RateLimiter: {
|
|
449
|
+
isTypeOnly: true;
|
|
450
|
+
};
|
|
451
|
+
RateLimiterConfig: {
|
|
452
|
+
isTypeOnly: true;
|
|
453
|
+
};
|
|
454
|
+
RateLimitResult: {
|
|
455
|
+
isTypeOnly: true;
|
|
456
|
+
};
|
|
457
|
+
}>>;
|
|
458
|
+
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
459
|
+
createContextFromRequest: {};
|
|
460
|
+
RequestServiceContext: {
|
|
461
|
+
isTypeOnly: true;
|
|
462
|
+
};
|
|
463
|
+
RequestServiceContextWith: {
|
|
464
|
+
isTypeOnly: true;
|
|
465
|
+
};
|
|
466
|
+
}>>;
|
|
467
|
+
}, {
|
|
468
|
+
constantsPassword: {};
|
|
469
|
+
}>;
|
|
470
|
+
servicesInvite: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
471
|
+
TPL_AUTH_WEB_APP: {};
|
|
472
|
+
TPL_INVITE_EMAIL: {};
|
|
473
|
+
}, {
|
|
474
|
+
appUrlsImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
475
|
+
getApiUrl: {};
|
|
476
|
+
getWebAppForUrl: {};
|
|
477
|
+
getWebOrigins: {};
|
|
478
|
+
getWebUrl: {};
|
|
479
|
+
WebAppName: {
|
|
480
|
+
isTypeOnly: true;
|
|
481
|
+
};
|
|
482
|
+
}>>;
|
|
483
|
+
authModuleImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
484
|
+
cleanupAuthVerificationQueue: {};
|
|
485
|
+
cleanupAuthVerificationWorker: {};
|
|
486
|
+
cleanupExpiredAuthVerifications: {};
|
|
487
|
+
consumeCodeVerification: {};
|
|
488
|
+
CookieUserSessionService: {};
|
|
489
|
+
createAuthVerification: {};
|
|
490
|
+
createCodeVerification: {};
|
|
491
|
+
userSessionPayload: {};
|
|
492
|
+
validateAuthVerification: {};
|
|
493
|
+
validateCodeVerification: {};
|
|
494
|
+
}>>;
|
|
495
|
+
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
496
|
+
BadRequestError: {};
|
|
497
|
+
ForbiddenError: {};
|
|
498
|
+
handleZodRequestValidationError: {};
|
|
499
|
+
HttpError: {};
|
|
500
|
+
InternalServerError: {};
|
|
501
|
+
logError: {};
|
|
502
|
+
NotFoundError: {};
|
|
503
|
+
throwIfPrismaNotFound: {};
|
|
504
|
+
TooManyRequestsError: {};
|
|
505
|
+
UnauthorizedError: {};
|
|
506
|
+
}>>;
|
|
507
|
+
passwordHasherServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
508
|
+
createPasswordHash: {};
|
|
509
|
+
verifyPasswordHash: {};
|
|
510
|
+
}>>;
|
|
511
|
+
prismaGeneratedImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
512
|
+
PrismaClient: {};
|
|
513
|
+
Prisma: {};
|
|
514
|
+
'*': {};
|
|
515
|
+
$Enums: {};
|
|
516
|
+
}>>;
|
|
517
|
+
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
518
|
+
prisma: {};
|
|
519
|
+
}>>;
|
|
520
|
+
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
521
|
+
createContextFromRequest: {};
|
|
522
|
+
RequestServiceContext: {
|
|
523
|
+
isTypeOnly: true;
|
|
524
|
+
};
|
|
525
|
+
RequestServiceContextWith: {
|
|
526
|
+
isTypeOnly: true;
|
|
527
|
+
};
|
|
528
|
+
}>>;
|
|
529
|
+
userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
530
|
+
UserSessionPayload: {
|
|
531
|
+
isTypeOnly: true;
|
|
532
|
+
};
|
|
533
|
+
UserSessionService: {
|
|
534
|
+
isTypeOnly: true;
|
|
535
|
+
};
|
|
536
|
+
}>>;
|
|
322
537
|
}, {
|
|
323
538
|
constantsPassword: {};
|
|
324
539
|
}>;
|