@baseplate-dev/plugin-auth 4.0.1 → 4.0.2
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 +621 -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 +49 -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 +17 -6
- 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 +209 -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 +5 -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 +5 -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 +48 -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 +253 -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 +102 -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/auth-verification.service.d.ts +40 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.js +106 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.ts +146 -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 +88 -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 +141 -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 +157 -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 +233 -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 +1 -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 +1 -1
- 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 +2 -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-renderers.d.ts +1 -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/typed-templates.d.ts +1 -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/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-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-DKJVe6Rd.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DLSGXjCI.js.map → __federation_expose_auth0CoreCommon-DKJVe6Rd.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-C7FfhlmF.js → __federation_expose_auth0CoreWeb-CfhSWZsK.js} +5 -5
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-C7FfhlmF.js.map → __federation_expose_auth0CoreWeb-CfhSWZsK.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-BF58isGa.js → __federation_expose_authCoreCommon-D3-Gk9mI.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-BF58isGa.js.map → __federation_expose_authCoreCommon-D3-Gk9mI.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-DMq9M88g.js → __federation_expose_authCoreWeb-DZoAij9e.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-DMq9M88g.js.map → __federation_expose_authCoreWeb-DZoAij9e.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-sQw4q5YX.js → __federation_expose_local-authAdminCommon-BRHnF0Hn.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-sQw4q5YX.js.map → __federation_expose_local-authAdminCommon-BRHnF0Hn.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-9FbO89NR.js → __federation_expose_local-authAdminWeb-dYAIxuqC.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-9FbO89NR.js.map → __federation_expose_local-authAdminWeb-dYAIxuqC.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CpUK09_4.js → __federation_expose_local-authCoreCommon-CIwvOx0d.js} +4 -4
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CpUK09_4.js.map → __federation_expose_local-authCoreCommon-CIwvOx0d.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-Czp0GaY1.js → __federation_expose_local-authCoreWeb-Bwooi2qZ.js} +66 -6
- package/dist/web/assets/__federation_expose_local-authCoreWeb-Bwooi2qZ.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CFDDdOMo.js → __federation_expose_placeholder-authCoreCommon-gFDSzGjB.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CFDDdOMo.js.map → __federation_expose_placeholder-authCoreCommon-gFDSzGjB.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-Bcn1_oDP.js → __federation_expose_placeholder-authCoreWeb-BZLwIkLk.js} +5 -5
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-Bcn1_oDP.js.map → __federation_expose_placeholder-authCoreWeb-BZLwIkLk.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-DsXcpNlB.js → __federation_fn_import-pxYUpmb_.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-DsXcpNlB.js.map → __federation_fn_import-pxYUpmb_.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-zqe3PPcn.js → web-BXi2UCP-.js} +7 -7
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BXi2UCP-.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-CmgMfkI5.js → project-builder-lib-O0clDXMb.js} +7137 -136
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-O0clDXMb.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BpuFQk6s.js +52536 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BpuFQk6s.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-BO5VHrCf.js → utils-UiZ-8JBg.js} +5 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-UiZ-8JBg.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CNzDweD5.js → react-router-BPEAtEJI.js} +1069 -746
- package/dist/web/assets/__federation_shared_@tanstack/react-router-BPEAtEJI.js.map +1 -0
- package/dist/web/assets/{get-auth-plugin-definition-BV2O8wTa.js → get-auth-plugin-definition-DPsrvQbo.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-BV2O8wTa.js.map → get-auth-plugin-definition-DPsrvQbo.js.map} +1 -1
- package/dist/web/assets/{index-BL7fotl7.js → index-CSfs0UAV.js} +2 -2
- package/dist/web/assets/{index-BL7fotl7.js.map → index-CSfs0UAV.js.map} +1 -1
- package/dist/web/assets/{index.esm-B4RpOlq_.js → index.esm-BoRQu8mM.js} +2 -2
- package/dist/web/assets/{index.esm-B4RpOlq_.js.map → index.esm-BoRQu8mM.js.map} +1 -1
- package/dist/web/assets/{model-merger-BwRNqcBu.js → model-merger-CdjliK9v.js} +80 -23
- package/dist/web/assets/model-merger-CdjliK9v.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-CHD5r-h7.js → plugin-definition-BG6tu7Hh.js} +3 -3
- package/dist/web/assets/plugin-definition-BG6tu7Hh.js.map +1 -0
- package/dist/web/assets/{plugin-definition-DA9rJBcS.js → plugin-definition-BMYDEj3f.js} +3 -3
- package/dist/web/assets/plugin-definition-BMYDEj3f.js.map +1 -0
- package/dist/web/assets/{plugin-definition-B9d2CoQL.js → plugin-definition-DRhTuQas.js} +2 -2
- package/dist/web/assets/{plugin-definition-B9d2CoQL.js.map → plugin-definition-DRhTuQas.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BMTsmwyH.js → plugin-definition-j1nJ0FFI.js} +2 -2
- package/dist/web/assets/{plugin-definition-BMTsmwyH.js.map → plugin-definition-j1nJ0FFI.js.map} +1 -1
- package/dist/web/assets/{react-B9vhIZMy.js → react-CBhSWxr_.js} +2 -2
- package/dist/web/assets/{react-B9vhIZMy.js.map → react-CBhSWxr_.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-BbHyE-2h.js} +3 -3
- package/dist/web/assets/{styles-CEm5K1iU.js.map → styles-BbHyE-2h.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +21 -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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RequestServiceContext } from '%requestServiceContextImports';
|
|
2
|
+
/**
|
|
3
|
+
* Request an email verification for the authenticated user.
|
|
4
|
+
* Sends a verification email with a link to verify.
|
|
5
|
+
*/
|
|
6
|
+
export declare function requestEmailVerification({ userId, context, }: {
|
|
7
|
+
userId: string;
|
|
8
|
+
context: RequestServiceContext;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
success: true;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Verify a user's email using the token from the verification email.
|
|
14
|
+
* This is a public (anonymous) mutation — the token proves identity.
|
|
15
|
+
*
|
|
16
|
+
* @throws BadRequestError if token is invalid or expired
|
|
17
|
+
*/
|
|
18
|
+
export declare function verifyEmail({ token, context, }: {
|
|
19
|
+
token: string;
|
|
20
|
+
context: RequestServiceContext;
|
|
21
|
+
}): Promise<{
|
|
22
|
+
success: true;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=email-verification.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-verification.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AA4C3E;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC,CA0C7B;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,EAChC,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC,CA4B7B"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { EMAIL_VERIFICATION_TOKEN_EXPIRY_SEC } from '$constantsPassword';
|
|
3
|
+
import { createAuthVerification, validateAuthVerification, } from '$servicesAuthVerification';
|
|
4
|
+
import { config } from '%configServiceImports';
|
|
5
|
+
import { sendEmail } from '%emailModuleImports';
|
|
6
|
+
import { BadRequestError } from '%errorHandlerServiceImports';
|
|
7
|
+
import { prisma } from '%prismaImports';
|
|
8
|
+
import { memoizeRateLimiter } from '%rateLimitImports';
|
|
9
|
+
import { AccountVerificationEmail } from '@blog-with-auth/transactional';
|
|
10
|
+
const EMAIL_VERIFY_TYPE = 'email-verify';
|
|
11
|
+
/**
|
|
12
|
+
* Rate limiters for email verification operations.
|
|
13
|
+
*/
|
|
14
|
+
// Per-user rate limit: 3 requests per 20 minutes
|
|
15
|
+
const getRequestEmailVerificationUserLimiter = memoizeRateLimiter('request-email-verification-user', {
|
|
16
|
+
points: 3,
|
|
17
|
+
duration: 60 * 20, // 20 minutes
|
|
18
|
+
});
|
|
19
|
+
// Per-IP rate limit: 10 requests/hour
|
|
20
|
+
const getRequestEmailVerificationIpLimiter = memoizeRateLimiter('request-email-verification-ip', {
|
|
21
|
+
points: 10,
|
|
22
|
+
duration: 60 * 60, // 1 hour
|
|
23
|
+
});
|
|
24
|
+
// Per-IP rate limit for verify endpoint: 10 requests/hour
|
|
25
|
+
const getVerifyEmailIpLimiter = memoizeRateLimiter('verify-email-ip', {
|
|
26
|
+
points: 10,
|
|
27
|
+
duration: 60 * 60, // 1 hour
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Request an email verification for the authenticated user.
|
|
31
|
+
* Sends a verification email with a link to verify.
|
|
32
|
+
*/
|
|
33
|
+
export async function requestEmailVerification({ userId, context, }) {
|
|
34
|
+
await Promise.all([
|
|
35
|
+
getRequestEmailVerificationIpLimiter().consumeOrThrow(context.reqInfo.ip, 'Too many verification attempts. Please try again later.', 'too-many-requests'),
|
|
36
|
+
getRequestEmailVerificationUserLimiter().consumeOrThrow(userId, 'Too many verification attempts. Please try again later.', 'too-many-requests'),
|
|
37
|
+
]);
|
|
38
|
+
const user = await prisma.user.findUnique({
|
|
39
|
+
where: { id: userId },
|
|
40
|
+
select: { id: true, email: true, emailVerified: true },
|
|
41
|
+
});
|
|
42
|
+
if (!user?.email) {
|
|
43
|
+
throw new BadRequestError('No email address on account', 'no-email');
|
|
44
|
+
}
|
|
45
|
+
if (user.emailVerified) {
|
|
46
|
+
return { success: true };
|
|
47
|
+
}
|
|
48
|
+
const { token } = await createAuthVerification({
|
|
49
|
+
type: EMAIL_VERIFY_TYPE,
|
|
50
|
+
userId: user.id,
|
|
51
|
+
expiresInSec: EMAIL_VERIFICATION_TOKEN_EXPIRY_SEC,
|
|
52
|
+
});
|
|
53
|
+
// Construct verification URL using configured domain
|
|
54
|
+
const verifyLink = `${config.AUTH_FRONTEND_URL}/auth/verify-email?token=${encodeURIComponent(token)}`;
|
|
55
|
+
await sendEmail(AccountVerificationEmail, {
|
|
56
|
+
to: user.email,
|
|
57
|
+
data: { verifyLink },
|
|
58
|
+
});
|
|
59
|
+
return { success: true };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Verify a user's email using the token from the verification email.
|
|
63
|
+
* This is a public (anonymous) mutation — the token proves identity.
|
|
64
|
+
*
|
|
65
|
+
* @throws BadRequestError if token is invalid or expired
|
|
66
|
+
*/
|
|
67
|
+
export async function verifyEmail({ token, context, }) {
|
|
68
|
+
await getVerifyEmailIpLimiter().consumeOrThrow(context.reqInfo.ip, 'Too many verification attempts. Please try again later.', 'too-many-requests');
|
|
69
|
+
const record = await validateAuthVerification({
|
|
70
|
+
type: EMAIL_VERIFY_TYPE,
|
|
71
|
+
token,
|
|
72
|
+
});
|
|
73
|
+
if (!record?.userId) {
|
|
74
|
+
throw new BadRequestError('Invalid or expired token', 'invalid-token');
|
|
75
|
+
}
|
|
76
|
+
// Delete this token + remaining email-verify tokens + update user in one transaction
|
|
77
|
+
await prisma.$transaction([
|
|
78
|
+
prisma.authVerification.deleteMany({
|
|
79
|
+
where: { type: EMAIL_VERIFY_TYPE, userId: record.userId },
|
|
80
|
+
}),
|
|
81
|
+
prisma.user.update({
|
|
82
|
+
where: { id: record.userId },
|
|
83
|
+
data: { emailVerified: true },
|
|
84
|
+
}),
|
|
85
|
+
]);
|
|
86
|
+
return { success: true };
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=email-verification.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-verification.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,mCAAmC,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC;;GAEG;AAEH,iDAAiD;AACjD,MAAM,sCAAsC,GAAG,kBAAkB,CAC/D,iCAAiC,EACjC;IACE,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,aAAa;CACjC,CACF,CAAC;AAEF,sCAAsC;AACtC,MAAM,oCAAoC,GAAG,kBAAkB,CAC7D,+BAA+B,EAC/B;IACE,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,SAAS;CAC7B,CACF,CAAC;AAEF,0DAA0D;AAC1D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xC,EAAE,EAAE,IAAI,CAAC,KAAK;QACd,IAAI,EAAE,EAAE,UAAU,EAAE;KACrB,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAChC,KAAK,EACL,OAAO,GAIR;IACC,MAAM,uBAAuB,EAAE,CAAC,cAAc,CAC5C,OAAO,CAAC,OAAO,CAAC,EAAE,EAClB,yDAAyD,EACzD,mBAAmB,CACpB,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC;QAC5C,IAAI,EAAE,iBAAiB;QACvB,KAAK;KACN,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,eAAe,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;IACzE,CAAC;IAED,qFAAqF;IACrF,MAAM,MAAM,CAAC,YAAY,CAAC;QACxB,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC;YACjC,KAAK,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;SAC1D,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YACjB,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE;YAC5B,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;SAC9B,CAAC;KACH,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import type { RequestServiceContext } from '%requestServiceContextImports';
|
|
4
|
+
|
|
5
|
+
import { EMAIL_VERIFICATION_TOKEN_EXPIRY_SEC } from '$constantsPassword';
|
|
6
|
+
import {
|
|
7
|
+
createAuthVerification,
|
|
8
|
+
validateAuthVerification,
|
|
9
|
+
} from '$servicesAuthVerification';
|
|
10
|
+
import { config } from '%configServiceImports';
|
|
11
|
+
import { sendEmail } from '%emailModuleImports';
|
|
12
|
+
import { BadRequestError } from '%errorHandlerServiceImports';
|
|
13
|
+
import { prisma } from '%prismaImports';
|
|
14
|
+
import { memoizeRateLimiter } from '%rateLimitImports';
|
|
15
|
+
import { AccountVerificationEmail } from '@blog-with-auth/transactional';
|
|
16
|
+
|
|
17
|
+
const EMAIL_VERIFY_TYPE = 'email-verify';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Rate limiters for email verification operations.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
// Per-user rate limit: 3 requests per 20 minutes
|
|
24
|
+
const getRequestEmailVerificationUserLimiter = memoizeRateLimiter(
|
|
25
|
+
'request-email-verification-user',
|
|
26
|
+
{
|
|
27
|
+
points: 3,
|
|
28
|
+
duration: 60 * 20, // 20 minutes
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
// Per-IP rate limit: 10 requests/hour
|
|
33
|
+
const getRequestEmailVerificationIpLimiter = memoizeRateLimiter(
|
|
34
|
+
'request-email-verification-ip',
|
|
35
|
+
{
|
|
36
|
+
points: 10,
|
|
37
|
+
duration: 60 * 60, // 1 hour
|
|
38
|
+
},
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// Per-IP rate limit for verify endpoint: 10 requests/hour
|
|
42
|
+
const getVerifyEmailIpLimiter = memoizeRateLimiter('verify-email-ip', {
|
|
43
|
+
points: 10,
|
|
44
|
+
duration: 60 * 60, // 1 hour
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Request an email verification for the authenticated user.
|
|
49
|
+
* Sends a verification email with a link to verify.
|
|
50
|
+
*/
|
|
51
|
+
export async function requestEmailVerification({
|
|
52
|
+
userId,
|
|
53
|
+
context,
|
|
54
|
+
}: {
|
|
55
|
+
userId: string;
|
|
56
|
+
context: RequestServiceContext;
|
|
57
|
+
}): Promise<{ success: true }> {
|
|
58
|
+
await Promise.all([
|
|
59
|
+
getRequestEmailVerificationIpLimiter().consumeOrThrow(
|
|
60
|
+
context.reqInfo.ip,
|
|
61
|
+
'Too many verification attempts. Please try again later.',
|
|
62
|
+
'too-many-requests',
|
|
63
|
+
),
|
|
64
|
+
getRequestEmailVerificationUserLimiter().consumeOrThrow(
|
|
65
|
+
userId,
|
|
66
|
+
'Too many verification attempts. Please try again later.',
|
|
67
|
+
'too-many-requests',
|
|
68
|
+
),
|
|
69
|
+
]);
|
|
70
|
+
|
|
71
|
+
const user = await prisma.user.findUnique({
|
|
72
|
+
where: { id: userId },
|
|
73
|
+
select: { id: true, email: true, emailVerified: true },
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
if (!user?.email) {
|
|
77
|
+
throw new BadRequestError('No email address on account', 'no-email');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (user.emailVerified) {
|
|
81
|
+
return { success: true };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const { token } = await createAuthVerification({
|
|
85
|
+
type: EMAIL_VERIFY_TYPE,
|
|
86
|
+
userId: user.id,
|
|
87
|
+
expiresInSec: EMAIL_VERIFICATION_TOKEN_EXPIRY_SEC,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// Construct verification URL using configured domain
|
|
91
|
+
const verifyLink = `${config.AUTH_FRONTEND_URL}/auth/verify-email?token=${encodeURIComponent(token)}`;
|
|
92
|
+
|
|
93
|
+
await sendEmail(AccountVerificationEmail, {
|
|
94
|
+
to: user.email,
|
|
95
|
+
data: { verifyLink },
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
return { success: true };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Verify a user's email using the token from the verification email.
|
|
103
|
+
* This is a public (anonymous) mutation — the token proves identity.
|
|
104
|
+
*
|
|
105
|
+
* @throws BadRequestError if token is invalid or expired
|
|
106
|
+
*/
|
|
107
|
+
export async function verifyEmail({
|
|
108
|
+
token,
|
|
109
|
+
context,
|
|
110
|
+
}: {
|
|
111
|
+
token: string;
|
|
112
|
+
context: RequestServiceContext;
|
|
113
|
+
}): Promise<{ success: true }> {
|
|
114
|
+
await getVerifyEmailIpLimiter().consumeOrThrow(
|
|
115
|
+
context.reqInfo.ip,
|
|
116
|
+
'Too many verification attempts. Please try again later.',
|
|
117
|
+
'too-many-requests',
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const record = await validateAuthVerification({
|
|
121
|
+
type: EMAIL_VERIFY_TYPE,
|
|
122
|
+
token,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
if (!record?.userId) {
|
|
126
|
+
throw new BadRequestError('Invalid or expired token', 'invalid-token');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Delete this token + remaining email-verify tokens + update user in one transaction
|
|
130
|
+
await prisma.$transaction([
|
|
131
|
+
prisma.authVerification.deleteMany({
|
|
132
|
+
where: { type: EMAIL_VERIFY_TYPE, userId: record.userId },
|
|
133
|
+
}),
|
|
134
|
+
prisma.user.update({
|
|
135
|
+
where: { id: record.userId },
|
|
136
|
+
data: { emailVerified: true },
|
|
137
|
+
}),
|
|
138
|
+
]);
|
|
139
|
+
|
|
140
|
+
return { success: true };
|
|
141
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RequestServiceContext } from '%requestServiceContextImports';
|
|
2
|
+
/**
|
|
3
|
+
* Request a password reset for the given email.
|
|
4
|
+
*/
|
|
5
|
+
export declare function requestPasswordReset({ email: rawEmail, context, }: {
|
|
6
|
+
email: string;
|
|
7
|
+
context: RequestServiceContext;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
success: true;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Validates a password reset token without consuming it.
|
|
13
|
+
* Used by the frontend to verify the token is valid before showing the reset form.
|
|
14
|
+
*/
|
|
15
|
+
export declare function validatePasswordResetToken({ token: rawToken, }: {
|
|
16
|
+
token: string;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
valid: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Completes the password reset process by setting a new password.
|
|
22
|
+
*
|
|
23
|
+
* Security notes (OWASP Forgot Password Cheat Sheet):
|
|
24
|
+
* - Token is single-use (deleted after successful reset)
|
|
25
|
+
* - Does not auto-login the user
|
|
26
|
+
* - Always invalidates all existing sessions for security
|
|
27
|
+
* - All remaining password-reset tokens for this user are deleted
|
|
28
|
+
*/
|
|
29
|
+
export declare function completePasswordReset({ token: rawToken, newPassword: rawNewPassword, }: {
|
|
30
|
+
token: string;
|
|
31
|
+
newPassword: string;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
success: true;
|
|
34
|
+
}>;
|
|
35
|
+
//# sourceMappingURL=password-reset.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-reset.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAgE3E;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,KAAK,EAAE,QAAQ,EACf,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC,CAgD7B;AAMD;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,EAC/C,KAAK,EAAE,QAAQ,GAChB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAW9B;AAOD;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,KAAK,EAAE,QAAQ,EACf,WAAW,EAAE,cAAc,GAC5B,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC,CA8D7B"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PASSWORD_RESET_TOKEN_EXPIRY_SEC, } from '$constantsPassword';
|
|
3
|
+
import { createAuthVerification, validateAuthVerification, } from '$servicesAuthVerification';
|
|
4
|
+
import { config } from '%configServiceImports';
|
|
5
|
+
import { sendEmail } from '%emailModuleImports';
|
|
6
|
+
import { BadRequestError, handleZodRequestValidationError, } from '%errorHandlerServiceImports';
|
|
7
|
+
import { createPasswordHash } from '%passwordHasherServiceImports';
|
|
8
|
+
import { prisma } from '%prismaImports';
|
|
9
|
+
import { memoizeRateLimiter } from '%rateLimitImports';
|
|
10
|
+
import { PasswordChangedEmail, PasswordResetEmail, } from '@blog-with-auth/transactional';
|
|
11
|
+
import z from 'zod';
|
|
12
|
+
const PROVIDER_ID = 'email-password';
|
|
13
|
+
const PASSWORD_RESET_TYPE = 'password-reset';
|
|
14
|
+
/**
|
|
15
|
+
* Rate limiters for password reset operations.
|
|
16
|
+
*/
|
|
17
|
+
// Per-email rate limit: 3 requests/hour
|
|
18
|
+
const getPasswordResetEmailLimiter = memoizeRateLimiter('password-reset-email', {
|
|
19
|
+
points: 3,
|
|
20
|
+
duration: 60 * 60, // 1 hour
|
|
21
|
+
});
|
|
22
|
+
// Per-IP rate limit: 10 requests/hour (prevents email scanning)
|
|
23
|
+
const getPasswordResetIpLimiter = memoizeRateLimiter('password-reset-ip', {
|
|
24
|
+
points: 10,
|
|
25
|
+
duration: 60 * 60, // 1 hour
|
|
26
|
+
});
|
|
27
|
+
// Global rate limit: 100 requests/hour (prevents overloading the email service)
|
|
28
|
+
const getPasswordResetGlobalLimiter = memoizeRateLimiter('password-reset-global', {
|
|
29
|
+
points: 100,
|
|
30
|
+
duration: 60 * 60, // 1 hour
|
|
31
|
+
});
|
|
32
|
+
const requestPasswordResetSchema = z.object({
|
|
33
|
+
email: z
|
|
34
|
+
.email()
|
|
35
|
+
.max(PASSWORD_MAX_LENGTH)
|
|
36
|
+
.transform((value) => value.toLowerCase()),
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* Request a password reset for the given email.
|
|
40
|
+
*/
|
|
41
|
+
export async function requestPasswordReset({ email: rawEmail, context, }) {
|
|
42
|
+
const { email } = await requestPasswordResetSchema
|
|
43
|
+
.parseAsync({ email: rawEmail })
|
|
44
|
+
.catch(handleZodRequestValidationError);
|
|
45
|
+
await Promise.all([
|
|
46
|
+
getPasswordResetIpLimiter().consumeOrThrow(context.reqInfo.ip, 'Too many password reset attempts. Please try again later.', 'too-many-requests'),
|
|
47
|
+
getPasswordResetEmailLimiter().consumeOrThrow(email, 'Too many password reset attempts. Please try again later.', 'too-many-requests'),
|
|
48
|
+
getPasswordResetGlobalLimiter().consumeOrThrow('global', 'Too many password reset attempts. Please try again later.', 'too-many-requests'),
|
|
49
|
+
]);
|
|
50
|
+
// Find user by email - silently handle non-existent users to prevent enumeration
|
|
51
|
+
const user = await prisma.user.findUnique({
|
|
52
|
+
where: { email },
|
|
53
|
+
select: { id: true, email: true },
|
|
54
|
+
});
|
|
55
|
+
if (user?.email) {
|
|
56
|
+
const { token } = await createAuthVerification({
|
|
57
|
+
type: PASSWORD_RESET_TYPE,
|
|
58
|
+
userId: user.id,
|
|
59
|
+
expiresInSec: PASSWORD_RESET_TOKEN_EXPIRY_SEC,
|
|
60
|
+
});
|
|
61
|
+
// Construct reset URL using configured domain
|
|
62
|
+
const resetLink = `${config.AUTH_FRONTEND_URL}/auth/reset-password?token=${encodeURIComponent(token)}`;
|
|
63
|
+
// Send email asynchronously (queue-based)
|
|
64
|
+
await sendEmail(PasswordResetEmail, {
|
|
65
|
+
to: user.email,
|
|
66
|
+
data: { resetLink },
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// Always return success to prevent user enumeration
|
|
70
|
+
return { success: true };
|
|
71
|
+
}
|
|
72
|
+
const validateTokenSchema = z.object({
|
|
73
|
+
token: z.string().min(1).max(PASSWORD_MAX_LENGTH),
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* Validates a password reset token without consuming it.
|
|
77
|
+
* Used by the frontend to verify the token is valid before showing the reset form.
|
|
78
|
+
*/
|
|
79
|
+
export async function validatePasswordResetToken({ token: rawToken, }) {
|
|
80
|
+
const { token } = await validateTokenSchema
|
|
81
|
+
.parseAsync({ token: rawToken })
|
|
82
|
+
.catch(handleZodRequestValidationError);
|
|
83
|
+
const record = await validateAuthVerification({
|
|
84
|
+
type: PASSWORD_RESET_TYPE,
|
|
85
|
+
token,
|
|
86
|
+
});
|
|
87
|
+
return { valid: record !== null };
|
|
88
|
+
}
|
|
89
|
+
const completePasswordResetSchema = z.object({
|
|
90
|
+
token: z.string().min(1).max(PASSWORD_MAX_LENGTH),
|
|
91
|
+
newPassword: z.string().min(PASSWORD_MIN_LENGTH).max(PASSWORD_MAX_LENGTH),
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Completes the password reset process by setting a new password.
|
|
95
|
+
*
|
|
96
|
+
* Security notes (OWASP Forgot Password Cheat Sheet):
|
|
97
|
+
* - Token is single-use (deleted after successful reset)
|
|
98
|
+
* - Does not auto-login the user
|
|
99
|
+
* - Always invalidates all existing sessions for security
|
|
100
|
+
* - All remaining password-reset tokens for this user are deleted
|
|
101
|
+
*/
|
|
102
|
+
export async function completePasswordReset({ token: rawToken, newPassword: rawNewPassword, }) {
|
|
103
|
+
const { token, newPassword } = await completePasswordResetSchema
|
|
104
|
+
.parseAsync({
|
|
105
|
+
token: rawToken,
|
|
106
|
+
newPassword: rawNewPassword,
|
|
107
|
+
})
|
|
108
|
+
.catch(handleZodRequestValidationError);
|
|
109
|
+
const record = await validateAuthVerification({
|
|
110
|
+
type: PASSWORD_RESET_TYPE,
|
|
111
|
+
token,
|
|
112
|
+
});
|
|
113
|
+
if (!record?.userId) {
|
|
114
|
+
throw new BadRequestError('Invalid or expired token', 'invalid-token');
|
|
115
|
+
}
|
|
116
|
+
const user = await prisma.user.findUniqueOrThrow({
|
|
117
|
+
where: { id: record.userId },
|
|
118
|
+
select: { id: true, email: true },
|
|
119
|
+
});
|
|
120
|
+
if (!user.email) {
|
|
121
|
+
throw new BadRequestError('User has no email', 'user-has-no-email');
|
|
122
|
+
}
|
|
123
|
+
const passwordHash = await createPasswordHash(newPassword);
|
|
124
|
+
// Delete token + remaining reset tokens + update password + invalidate sessions
|
|
125
|
+
await prisma.$transaction([
|
|
126
|
+
prisma.authVerification.deleteMany({
|
|
127
|
+
where: { type: PASSWORD_RESET_TYPE, userId: user.id },
|
|
128
|
+
}),
|
|
129
|
+
prisma.userAccount.upsert({
|
|
130
|
+
where: {
|
|
131
|
+
accountId_providerId: {
|
|
132
|
+
accountId: user.email,
|
|
133
|
+
providerId: PROVIDER_ID,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
create: {
|
|
137
|
+
userId: user.id,
|
|
138
|
+
accountId: user.email,
|
|
139
|
+
providerId: PROVIDER_ID,
|
|
140
|
+
password: passwordHash,
|
|
141
|
+
},
|
|
142
|
+
update: {
|
|
143
|
+
password: passwordHash,
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
146
|
+
prisma.userSession.deleteMany({
|
|
147
|
+
where: { userId: user.id },
|
|
148
|
+
}),
|
|
149
|
+
]);
|
|
150
|
+
// Send password changed confirmation email
|
|
151
|
+
await sendEmail(PasswordChangedEmail, {
|
|
152
|
+
to: user.email,
|
|
153
|
+
data: {},
|
|
154
|
+
});
|
|
155
|
+
return { success: true };
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=password-reset.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-reset.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAE7C;;GAEG;AAEH,wCAAwC;AACxC,MAAM,4BAA4B,GAAG,kBAAkB,CACrD,sBAAsB,EACtB;IACE,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,SAAS;CAC7B,CACF,CAAC;AAEF,gEAAgE;AAChE,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,mBAAmB,EAAE;IACxE,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,SAAS;CAC7B,CAAC,CAAC;AAEH,gFAAgF;AAChF,MAAM,6BAA6B,GAAG,kBAAkB,CACtD,uBAAuB,EACvB;IACE,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,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