@baseplate-dev/plugin-auth 4.0.1 → 4.0.3
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 +645 -0
- package/dist/auth0/core/schema/plugin-definition.js +1 -1
- package/dist/auth0/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/templates/module/schema/user-session.queries.ts +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
- package/dist/local-auth/constants/model-names.d.ts +4 -0
- package/dist/local-auth/constants/model-names.d.ts.map +1 -1
- package/dist/local-auth/constants/model-names.js +4 -0
- package/dist/local-auth/constants/model-names.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +53 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +28 -7
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +219 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +4 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +47 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +38 -2
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +18 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js +12 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +271 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +85 -4
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +15 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +15 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +18 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js +24 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.ts +35 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js +38 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.ts +54 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts +24 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +87 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +140 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +35 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +156 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +229 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +48 -14
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +79 -15
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts +43 -0
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js +48 -0
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts +96 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.js +11 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts +14 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js +26 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts +41 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js +59 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts +60 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js +42 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.js +2 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js +14 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.tsx +55 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js +12 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.tsx +44 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js +14 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.tsx +55 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +11 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +12 -2
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +26 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +10 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +25 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +6 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +19 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +30 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js +17 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts +21 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +2 -2
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +2 -2
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts +40 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js +106 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.ts +146 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +1 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +722 -4
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/index.js +2 -0
- package/dist/local-auth/core/generators/auth-routes/generated/index.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js +4 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +4 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +14 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts +21 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js +30 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +1216 -34
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +70 -2
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/index.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-routes/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/index.js +1 -0
- package/dist/local-auth/core/generators/auth-routes/index.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts +10 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js +11 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.ts +12 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js +60 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.tsx +127 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +6 -11
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +20 -19
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +2 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +2 -3
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +131 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +240 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js +106 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.tsx +206 -0
- package/dist/local-auth/core/generators/index.d.ts +1 -0
- package/dist/local-auth/core/generators/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/index.js +1 -0
- package/dist/local-auth/core/generators/index.js.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +12 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts +6 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts +6 -0
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js.map +1 -1
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +11 -1
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/models.d.ts.map +1 -1
- package/dist/local-auth/core/schema/models.js +60 -0
- package/dist/local-auth/core/schema/models.js.map +1 -1
- package/dist/placeholder-auth/core/schema/plugin-definition.js +1 -1
- package/dist/placeholder-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DLSGXjCI.js → __federation_expose_auth0CoreCommon-e_GtBIIm.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DLSGXjCI.js.map → __federation_expose_auth0CoreCommon-e_GtBIIm.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-C7FfhlmF.js → __federation_expose_auth0CoreWeb-CTfPylMw.js} +5 -5
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-C7FfhlmF.js.map → __federation_expose_auth0CoreWeb-CTfPylMw.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-BF58isGa.js → __federation_expose_authCoreCommon-Bg2mzE9K.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-BF58isGa.js.map → __federation_expose_authCoreCommon-Bg2mzE9K.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-DMq9M88g.js → __federation_expose_authCoreWeb-DrOVHmj4.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-DMq9M88g.js.map → __federation_expose_authCoreWeb-DrOVHmj4.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-sQw4q5YX.js → __federation_expose_local-authAdminCommon-Bzb0P17-.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-sQw4q5YX.js.map → __federation_expose_local-authAdminCommon-Bzb0P17-.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-9FbO89NR.js → __federation_expose_local-authAdminWeb-D_LWcl7j.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-9FbO89NR.js.map → __federation_expose_local-authAdminWeb-D_LWcl7j.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CpUK09_4.js → __federation_expose_local-authCoreCommon-D6OG-Rz6.js} +4 -4
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CpUK09_4.js.map → __federation_expose_local-authCoreCommon-D6OG-Rz6.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-Czp0GaY1.js → __federation_expose_local-authCoreWeb-CaR8fx1f.js} +66 -6
- package/dist/web/assets/__federation_expose_local-authCoreWeb-CaR8fx1f.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CFDDdOMo.js → __federation_expose_placeholder-authCoreCommon-D7b3GEPP.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CFDDdOMo.js.map → __federation_expose_placeholder-authCoreCommon-D7b3GEPP.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-Bcn1_oDP.js → __federation_expose_placeholder-authCoreWeb-VZzvid5j.js} +5 -5
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-Bcn1_oDP.js.map → __federation_expose_placeholder-authCoreWeb-VZzvid5j.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-DsXcpNlB.js → __federation_fn_import-DfNliZHH.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-DsXcpNlB.js.map → __federation_fn_import-DfNliZHH.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-zqe3PPcn.js → web-BqJ1vSYx.js} +8 -8
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BqJ1vSYx.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-CmgMfkI5.js → project-builder-lib-qf98MMJC.js} +7137 -136
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-qf98MMJC.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DFkMnXmX.js +52536 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DFkMnXmX.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-BO5VHrCf.js → utils-CApJheqk.js} +5 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CApJheqk.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CNzDweD5.js → react-router-YQslfDyE.js} +1069 -746
- package/dist/web/assets/__federation_shared_@tanstack/react-router-YQslfDyE.js.map +1 -0
- package/dist/web/assets/{get-auth-plugin-definition-BV2O8wTa.js → get-auth-plugin-definition-CVuj_mvy.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-BV2O8wTa.js.map → get-auth-plugin-definition-CVuj_mvy.js.map} +1 -1
- package/dist/web/assets/{index-BL7fotl7.js → index-B00D4irM.js} +2 -2
- package/dist/web/assets/{index-BL7fotl7.js.map → index-B00D4irM.js.map} +1 -1
- package/dist/web/assets/{index.esm-B4RpOlq_.js → index.esm-1qBxxnfu.js} +2 -2
- package/dist/web/assets/{index.esm-B4RpOlq_.js.map → index.esm-1qBxxnfu.js.map} +1 -1
- package/dist/web/assets/{model-merger-BwRNqcBu.js → model-merger-59HLmy_J.js} +80 -23
- package/dist/web/assets/model-merger-59HLmy_J.js.map +1 -0
- package/dist/web/assets/{model-names-CEoSIalq.js → model-names-DrcaRxt1.js} +6 -2
- package/dist/web/assets/{model-names-CEoSIalq.js.map → model-names-DrcaRxt1.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BMTsmwyH.js → plugin-definition-BKCeZ0Ni.js} +2 -2
- package/dist/web/assets/{plugin-definition-BMTsmwyH.js.map → plugin-definition-BKCeZ0Ni.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-DA9rJBcS.js → plugin-definition-B_hlyPlm.js} +3 -3
- package/dist/web/assets/plugin-definition-B_hlyPlm.js.map +1 -0
- package/dist/web/assets/{plugin-definition-CHD5r-h7.js → plugin-definition-Bkx-a_wA.js} +3 -3
- package/dist/web/assets/plugin-definition-Bkx-a_wA.js.map +1 -0
- package/dist/web/assets/{plugin-definition-B9d2CoQL.js → plugin-definition-CcdhC0td.js} +2 -2
- package/dist/web/assets/{plugin-definition-B9d2CoQL.js.map → plugin-definition-CcdhC0td.js.map} +1 -1
- package/dist/web/assets/{react-B9vhIZMy.js → react-Df9ccuow.js} +2 -2
- package/dist/web/assets/{react-B9vhIZMy.js.map → react-Df9ccuow.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +20 -20
- package/dist/web/assets/{style-DZ-aOCkd.css → style-DiK_rD1L.css} +1 -1
- package/dist/web/assets/{styles-CEm5K1iU.js → styles-CbPVroCT.js} +3 -3
- package/dist/web/assets/{styles-CEm5K1iU.js.map → styles-CbPVroCT.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +22 -19
- package/dist/web/assets/__federation_expose_local-authCoreWeb-Czp0GaY1.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-zqe3PPcn.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CmgMfkI5.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-D1Dayhn9.js +0 -24082
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-D1Dayhn9.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-BO5VHrCf.js.map +0 -1
- package/dist/web/assets/__federation_shared_@tanstack/react-router-CNzDweD5.js.map +0 -1
- package/dist/web/assets/model-merger-BwRNqcBu.js.map +0 -1
- package/dist/web/assets/plugin-definition-CHD5r-h7.js.map +0 -1
- package/dist/web/assets/plugin-definition-DA9rJBcS.js.map +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import type { AuthVerification, Prisma } from '%prismaGeneratedImports';
|
|
4
|
+
|
|
5
|
+
import { prisma } from '%prismaImports';
|
|
6
|
+
import * as crypto from 'node:crypto';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Split-token pattern for secure verification flows.
|
|
10
|
+
*
|
|
11
|
+
* - selector: random identifier used for DB lookup (stored as `identifier`)
|
|
12
|
+
* - verifier: random secret, hashed before storage (stored as `value`)
|
|
13
|
+
* - token: `{selector}.{verifier}` — the value sent to the user
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function generateSplitToken(): { selector: string; verifier: string } {
|
|
17
|
+
return {
|
|
18
|
+
selector: crypto.randomBytes(16).toString('base64url'),
|
|
19
|
+
verifier: crypto.randomBytes(16).toString('base64url'),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function hashVerifier(verifier: string): string {
|
|
24
|
+
return crypto.createHash('sha256').update(verifier).digest('hex');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Constant-time comparison of two hex strings to prevent timing attacks.
|
|
29
|
+
*/
|
|
30
|
+
function safeCompare(a: string, b: string): boolean {
|
|
31
|
+
if (a.length !== b.length) return false;
|
|
32
|
+
return crypto.timingSafeEqual(Buffer.from(a, 'hex'), Buffer.from(b, 'hex'));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function encodeToken(selector: string, verifier: string): string {
|
|
36
|
+
return `${selector}.${verifier}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function decodeToken(
|
|
40
|
+
token: string,
|
|
41
|
+
): { selector: string; verifier: string } | null {
|
|
42
|
+
const dotIndex = token.indexOf('.');
|
|
43
|
+
if (dotIndex === -1) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
selector: token.slice(0, dotIndex),
|
|
48
|
+
verifier: token.slice(dotIndex + 1),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Creates a new auth verification using the split-token pattern.
|
|
54
|
+
*
|
|
55
|
+
* @param type - Verification type (e.g., "password-reset", "email-verify")
|
|
56
|
+
* @param userId - Optional user ID to associate with the token
|
|
57
|
+
* @param expiresInSec - Token lifetime in seconds
|
|
58
|
+
* @param metadata - Optional JSON metadata to store with the token
|
|
59
|
+
* @returns The combined token (`{selector}.{verifier}`) to send to the user
|
|
60
|
+
*/
|
|
61
|
+
export async function createAuthVerification({
|
|
62
|
+
type,
|
|
63
|
+
userId,
|
|
64
|
+
expiresInSec,
|
|
65
|
+
metadata,
|
|
66
|
+
}: {
|
|
67
|
+
type: string;
|
|
68
|
+
userId?: string;
|
|
69
|
+
expiresInSec: number;
|
|
70
|
+
metadata?: Prisma.JsonValue;
|
|
71
|
+
}): Promise<{ token: string }> {
|
|
72
|
+
const { selector, verifier } = generateSplitToken();
|
|
73
|
+
const value = hashVerifier(verifier);
|
|
74
|
+
const expiresAt = new Date(Date.now() + expiresInSec * 1000);
|
|
75
|
+
|
|
76
|
+
await prisma.authVerification.create({
|
|
77
|
+
data: {
|
|
78
|
+
type,
|
|
79
|
+
identifier: selector,
|
|
80
|
+
value,
|
|
81
|
+
userId,
|
|
82
|
+
metadata: metadata ?? undefined,
|
|
83
|
+
expiresAt,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
return { token: encodeToken(selector, verifier) };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Validates an auth verification token without consuming it.
|
|
92
|
+
* Returns the full record if valid so the caller can delete it
|
|
93
|
+
* as part of their own transaction.
|
|
94
|
+
*
|
|
95
|
+
* Security: If the selector matches but the verifier is wrong or expired,
|
|
96
|
+
* the token is deleted to prevent brute-force attempts.
|
|
97
|
+
*
|
|
98
|
+
* @throws BadRequestError if token is invalid, expired, or malformed
|
|
99
|
+
*/
|
|
100
|
+
export async function validateAuthVerification({
|
|
101
|
+
type,
|
|
102
|
+
token,
|
|
103
|
+
}: {
|
|
104
|
+
type: string;
|
|
105
|
+
token: string;
|
|
106
|
+
}): Promise<AuthVerification | null> {
|
|
107
|
+
const decoded = decodeToken(token);
|
|
108
|
+
|
|
109
|
+
if (!decoded) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const record = await prisma.authVerification.findUnique({
|
|
114
|
+
where: { type_identifier: { type, identifier: decoded.selector } },
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
if (!record) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (
|
|
122
|
+
!safeCompare(record.value, hashVerifier(decoded.verifier)) ||
|
|
123
|
+
record.expiresAt < new Date()
|
|
124
|
+
) {
|
|
125
|
+
await prisma.authVerification.delete({ where: { id: record.id } });
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return record;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Cleanup job to delete expired auth verification tokens.
|
|
134
|
+
* Should be called periodically (e.g., via cron job or queue).
|
|
135
|
+
*/
|
|
136
|
+
export async function cleanupExpiredAuthVerifications(): Promise<{
|
|
137
|
+
deletedCount: number;
|
|
138
|
+
}> {
|
|
139
|
+
const result = await prisma.authVerification.deleteMany({
|
|
140
|
+
where: {
|
|
141
|
+
expiresAt: { lt: new Date() },
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
return { deletedCount: result.count };
|
|
146
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-routes.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-routes/auth-routes.generator.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"auth-routes.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-routes/auth-routes.generator.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-routes.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-routes/auth-routes.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE9F,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,uBAAuB;IAC7B,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI;QACrC,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC,IAAI;QAC7C,IAAI,EAAE,mBAAmB,CAAC;YACxB,YAAY,EAAE;gBACZ,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC,QAAQ;aAClD;YACD,GAAG,CAAC,EAAE,SAAS,EAAE;gBACf,OAAO;oBACL,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACvB,MAAM,OAAO,CAAC,KAAK,CACjB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;4BACzB,SAAS,EAAE,EAAE;yBACd,CAAC,CACH,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-routes.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-routes/auth-routes.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE9F,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,uBAAuB;IAC7B,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI;QACrC,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC,IAAI;QAC7C,IAAI,EAAE,mBAAmB,CAAC;YACxB,YAAY,EAAE;gBACZ,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC,QAAQ;aAClD;YACD,GAAG,CAAC,EAAE,SAAS,EAAE;gBACf,OAAO;oBACL,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACvB,MAAM,OAAO,CAAC,KAAK,CACjB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;4BACzB,SAAS,EAAE,EAAE;yBACd,CAAC,CACH,CAAC;wBACF,MAAM,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;oBACxD,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|