@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.
Files changed (285) hide show
  1. package/CHANGELOG.md +645 -0
  2. package/dist/auth0/core/schema/plugin-definition.js +1 -1
  3. package/dist/auth0/core/schema/plugin-definition.js.map +1 -1
  4. package/dist/auth0/generators/fastify/auth0-module/templates/module/schema/user-session.queries.ts +1 -1
  5. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +1 -1
  6. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
  7. package/dist/local-auth/constants/model-names.d.ts +4 -0
  8. package/dist/local-auth/constants/model-names.d.ts.map +1 -1
  9. package/dist/local-auth/constants/model-names.js +4 -0
  10. package/dist/local-auth/constants/model-names.js.map +1 -1
  11. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +53 -0
  12. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
  13. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +28 -7
  14. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
  15. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +219 -0
  16. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
  17. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +4 -0
  18. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +1 -1
  19. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +4 -0
  20. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js.map +1 -1
  21. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +47 -1
  22. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -1
  23. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +38 -2
  24. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -1
  25. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +18 -0
  26. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +1 -1
  27. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js +12 -0
  28. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +1 -1
  29. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +271 -0
  30. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
  31. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +85 -4
  32. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
  33. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +15 -0
  34. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts.map +1 -1
  35. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +15 -0
  36. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js.map +1 -1
  37. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +18 -0
  38. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts +2 -0
  39. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts.map +1 -0
  40. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js +24 -0
  41. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js.map +1 -0
  42. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.ts +35 -0
  43. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts +2 -0
  44. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts.map +1 -0
  45. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js +38 -0
  46. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +1 -0
  47. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.ts +54 -0
  48. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts +24 -0
  49. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts.map +1 -0
  50. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +87 -0
  51. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js.map +1 -0
  52. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +140 -0
  53. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +35 -0
  54. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -0
  55. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +156 -0
  56. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -0
  57. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +229 -0
  58. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
  59. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +48 -14
  60. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
  61. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +79 -15
  62. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts +43 -0
  63. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts.map +1 -0
  64. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js +48 -0
  65. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js.map +1 -0
  66. package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts +96 -0
  67. package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts.map +1 -0
  68. package/dist/local-auth/core/generators/auth-email-templates/generated/index.js +11 -0
  69. package/dist/local-auth/core/generators/auth-email-templates/generated/index.js.map +1 -0
  70. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts +14 -0
  71. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts.map +1 -0
  72. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js +26 -0
  73. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js.map +1 -0
  74. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts +41 -0
  75. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts.map +1 -0
  76. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js +59 -0
  77. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js.map +1 -0
  78. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts +60 -0
  79. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts.map +1 -0
  80. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js +42 -0
  81. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js.map +1 -0
  82. package/dist/local-auth/core/generators/auth-email-templates/index.d.ts +2 -0
  83. package/dist/local-auth/core/generators/auth-email-templates/index.d.ts.map +1 -0
  84. package/dist/local-auth/core/generators/auth-email-templates/index.js +2 -0
  85. package/dist/local-auth/core/generators/auth-email-templates/index.js.map +1 -0
  86. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts +3 -0
  87. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts.map +1 -0
  88. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js +14 -0
  89. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js.map +1 -0
  90. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.tsx +55 -0
  91. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts +3 -0
  92. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts.map +1 -0
  93. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js +12 -0
  94. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js.map +1 -0
  95. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.tsx +44 -0
  96. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts +3 -0
  97. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts.map +1 -0
  98. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js +14 -0
  99. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js.map +1 -0
  100. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.tsx +55 -0
  101. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +11 -0
  102. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
  103. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +12 -2
  104. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
  105. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +26 -0
  106. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
  107. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +2 -0
  108. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -1
  109. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +2 -0
  110. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -1
  111. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +10 -0
  112. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
  113. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +25 -1
  114. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
  115. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +9 -0
  116. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +1 -1
  117. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +6 -0
  118. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -1
  119. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +19 -0
  120. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
  121. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +30 -0
  122. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
  123. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts +6 -0
  124. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts.map +1 -0
  125. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js +17 -0
  126. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js.map +1 -0
  127. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts +21 -0
  128. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +1 -1
  129. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +1 -1
  130. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +1 -1
  131. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +2 -2
  132. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -1
  133. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +2 -2
  134. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts +40 -0
  135. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts.map +1 -0
  136. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js +106 -0
  137. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js.map +1 -0
  138. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.ts +146 -0
  139. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
  140. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +1 -0
  141. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -1
  142. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +722 -4
  143. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
  144. package/dist/local-auth/core/generators/auth-routes/generated/index.js +2 -0
  145. package/dist/local-auth/core/generators/auth-routes/generated/index.js.map +1 -1
  146. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts +4 -0
  147. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts.map +1 -1
  148. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js +4 -0
  149. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js.map +1 -1
  150. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +4 -1
  151. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
  152. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +14 -0
  153. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js.map +1 -1
  154. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts +21 -0
  155. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts.map +1 -0
  156. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js +30 -0
  157. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js.map +1 -0
  158. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +1216 -34
  159. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
  160. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +70 -2
  161. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -1
  162. package/dist/local-auth/core/generators/auth-routes/index.d.ts +2 -0
  163. package/dist/local-auth/core/generators/auth-routes/index.d.ts.map +1 -1
  164. package/dist/local-auth/core/generators/auth-routes/index.js +1 -0
  165. package/dist/local-auth/core/generators/auth-routes/index.js.map +1 -1
  166. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts +10 -0
  167. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts.map +1 -0
  168. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js +11 -0
  169. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js.map +1 -0
  170. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.ts +12 -0
  171. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts +2 -0
  172. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts.map +1 -0
  173. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js +60 -0
  174. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js.map +1 -0
  175. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.tsx +127 -0
  176. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts +1 -1
  177. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +1 -1
  178. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +6 -11
  179. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -1
  180. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +20 -19
  181. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts +1 -1
  182. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -1
  183. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +2 -2
  184. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -1
  185. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +2 -3
  186. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts +7 -0
  187. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts.map +1 -0
  188. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +131 -0
  189. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +1 -0
  190. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +240 -0
  191. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts +7 -0
  192. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts.map +1 -0
  193. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js +106 -0
  194. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js.map +1 -0
  195. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.tsx +206 -0
  196. package/dist/local-auth/core/generators/index.d.ts +1 -0
  197. package/dist/local-auth/core/generators/index.d.ts.map +1 -1
  198. package/dist/local-auth/core/generators/index.js +1 -0
  199. package/dist/local-auth/core/generators/index.js.map +1 -1
  200. package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +12 -0
  201. package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts.map +1 -1
  202. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts +6 -0
  203. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts.map +1 -1
  204. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts +6 -0
  205. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts.map +1 -1
  206. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts +6 -0
  207. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts.map +1 -1
  208. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js +1 -1
  209. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js.map +1 -1
  210. package/dist/local-auth/core/node.d.ts.map +1 -1
  211. package/dist/local-auth/core/node.js +11 -1
  212. package/dist/local-auth/core/node.js.map +1 -1
  213. package/dist/local-auth/core/schema/models.d.ts.map +1 -1
  214. package/dist/local-auth/core/schema/models.js +60 -0
  215. package/dist/local-auth/core/schema/models.js.map +1 -1
  216. package/dist/placeholder-auth/core/schema/plugin-definition.js +1 -1
  217. package/dist/placeholder-auth/core/schema/plugin-definition.js.map +1 -1
  218. package/dist/web/assets/{__federation_expose_auth0CoreCommon-DLSGXjCI.js → __federation_expose_auth0CoreCommon-e_GtBIIm.js} +3 -3
  219. package/dist/web/assets/{__federation_expose_auth0CoreCommon-DLSGXjCI.js.map → __federation_expose_auth0CoreCommon-e_GtBIIm.js.map} +1 -1
  220. package/dist/web/assets/{__federation_expose_auth0CoreWeb-C7FfhlmF.js → __federation_expose_auth0CoreWeb-CTfPylMw.js} +5 -5
  221. package/dist/web/assets/{__federation_expose_auth0CoreWeb-C7FfhlmF.js.map → __federation_expose_auth0CoreWeb-CTfPylMw.js.map} +1 -1
  222. package/dist/web/assets/{__federation_expose_authCoreCommon-BF58isGa.js → __federation_expose_authCoreCommon-Bg2mzE9K.js} +3 -3
  223. package/dist/web/assets/{__federation_expose_authCoreCommon-BF58isGa.js.map → __federation_expose_authCoreCommon-Bg2mzE9K.js.map} +1 -1
  224. package/dist/web/assets/{__federation_expose_authCoreWeb-DMq9M88g.js → __federation_expose_authCoreWeb-DrOVHmj4.js} +6 -6
  225. package/dist/web/assets/{__federation_expose_authCoreWeb-DMq9M88g.js.map → __federation_expose_authCoreWeb-DrOVHmj4.js.map} +1 -1
  226. package/dist/web/assets/{__federation_expose_local-authAdminCommon-sQw4q5YX.js → __federation_expose_local-authAdminCommon-Bzb0P17-.js} +2 -2
  227. package/dist/web/assets/{__federation_expose_local-authAdminCommon-sQw4q5YX.js.map → __federation_expose_local-authAdminCommon-Bzb0P17-.js.map} +1 -1
  228. package/dist/web/assets/{__federation_expose_local-authAdminWeb-9FbO89NR.js → __federation_expose_local-authAdminWeb-D_LWcl7j.js} +3 -3
  229. package/dist/web/assets/{__federation_expose_local-authAdminWeb-9FbO89NR.js.map → __federation_expose_local-authAdminWeb-D_LWcl7j.js.map} +1 -1
  230. package/dist/web/assets/{__federation_expose_local-authCoreCommon-CpUK09_4.js → __federation_expose_local-authCoreCommon-D6OG-Rz6.js} +4 -4
  231. package/dist/web/assets/{__federation_expose_local-authCoreCommon-CpUK09_4.js.map → __federation_expose_local-authCoreCommon-D6OG-Rz6.js.map} +1 -1
  232. package/dist/web/assets/{__federation_expose_local-authCoreWeb-Czp0GaY1.js → __federation_expose_local-authCoreWeb-CaR8fx1f.js} +66 -6
  233. package/dist/web/assets/__federation_expose_local-authCoreWeb-CaR8fx1f.js.map +1 -0
  234. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CFDDdOMo.js → __federation_expose_placeholder-authCoreCommon-D7b3GEPP.js} +3 -3
  235. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-CFDDdOMo.js.map → __federation_expose_placeholder-authCoreCommon-D7b3GEPP.js.map} +1 -1
  236. package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-Bcn1_oDP.js → __federation_expose_placeholder-authCoreWeb-VZzvid5j.js} +5 -5
  237. package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-Bcn1_oDP.js.map → __federation_expose_placeholder-authCoreWeb-VZzvid5j.js.map} +1 -1
  238. package/dist/web/assets/{__federation_fn_import-DsXcpNlB.js → __federation_fn_import-DfNliZHH.js} +2 -2
  239. package/dist/web/assets/{__federation_fn_import-DsXcpNlB.js.map → __federation_fn_import-DfNliZHH.js.map} +1 -1
  240. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-zqe3PPcn.js → web-BqJ1vSYx.js} +8 -8
  241. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BqJ1vSYx.js.map +1 -0
  242. package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-CmgMfkI5.js → project-builder-lib-qf98MMJC.js} +7137 -136
  243. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-qf98MMJC.js.map +1 -0
  244. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DFkMnXmX.js +52536 -0
  245. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DFkMnXmX.js.map +1 -0
  246. package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-BO5VHrCf.js → utils-CApJheqk.js} +5 -6
  247. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CApJheqk.js.map +1 -0
  248. package/dist/web/assets/__federation_shared_@tanstack/{react-router-CNzDweD5.js → react-router-YQslfDyE.js} +1069 -746
  249. package/dist/web/assets/__federation_shared_@tanstack/react-router-YQslfDyE.js.map +1 -0
  250. package/dist/web/assets/{get-auth-plugin-definition-BV2O8wTa.js → get-auth-plugin-definition-CVuj_mvy.js} +2 -2
  251. package/dist/web/assets/{get-auth-plugin-definition-BV2O8wTa.js.map → get-auth-plugin-definition-CVuj_mvy.js.map} +1 -1
  252. package/dist/web/assets/{index-BL7fotl7.js → index-B00D4irM.js} +2 -2
  253. package/dist/web/assets/{index-BL7fotl7.js.map → index-B00D4irM.js.map} +1 -1
  254. package/dist/web/assets/{index.esm-B4RpOlq_.js → index.esm-1qBxxnfu.js} +2 -2
  255. package/dist/web/assets/{index.esm-B4RpOlq_.js.map → index.esm-1qBxxnfu.js.map} +1 -1
  256. package/dist/web/assets/{model-merger-BwRNqcBu.js → model-merger-59HLmy_J.js} +80 -23
  257. package/dist/web/assets/model-merger-59HLmy_J.js.map +1 -0
  258. package/dist/web/assets/{model-names-CEoSIalq.js → model-names-DrcaRxt1.js} +6 -2
  259. package/dist/web/assets/{model-names-CEoSIalq.js.map → model-names-DrcaRxt1.js.map} +1 -1
  260. package/dist/web/assets/{plugin-definition-BMTsmwyH.js → plugin-definition-BKCeZ0Ni.js} +2 -2
  261. package/dist/web/assets/{plugin-definition-BMTsmwyH.js.map → plugin-definition-BKCeZ0Ni.js.map} +1 -1
  262. package/dist/web/assets/{plugin-definition-DA9rJBcS.js → plugin-definition-B_hlyPlm.js} +3 -3
  263. package/dist/web/assets/plugin-definition-B_hlyPlm.js.map +1 -0
  264. package/dist/web/assets/{plugin-definition-CHD5r-h7.js → plugin-definition-Bkx-a_wA.js} +3 -3
  265. package/dist/web/assets/plugin-definition-Bkx-a_wA.js.map +1 -0
  266. package/dist/web/assets/{plugin-definition-B9d2CoQL.js → plugin-definition-CcdhC0td.js} +2 -2
  267. package/dist/web/assets/{plugin-definition-B9d2CoQL.js.map → plugin-definition-CcdhC0td.js.map} +1 -1
  268. package/dist/web/assets/{react-B9vhIZMy.js → react-Df9ccuow.js} +2 -2
  269. package/dist/web/assets/{react-B9vhIZMy.js.map → react-Df9ccuow.js.map} +1 -1
  270. package/dist/web/assets/remoteEntry.js +20 -20
  271. package/dist/web/assets/{style-DZ-aOCkd.css → style-DiK_rD1L.css} +1 -1
  272. package/dist/web/assets/{styles-CEm5K1iU.js → styles-CbPVroCT.js} +3 -3
  273. package/dist/web/assets/{styles-CEm5K1iU.js.map → styles-CbPVroCT.js.map} +1 -1
  274. package/dist/web/index.html +1 -1
  275. package/package.json +22 -19
  276. package/dist/web/assets/__federation_expose_local-authCoreWeb-Czp0GaY1.js.map +0 -1
  277. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-zqe3PPcn.js.map +0 -1
  278. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CmgMfkI5.js.map +0 -1
  279. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-D1Dayhn9.js +0 -24082
  280. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-D1Dayhn9.js.map +0 -1
  281. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-BO5VHrCf.js.map +0 -1
  282. package/dist/web/assets/__federation_shared_@tanstack/react-router-CNzDweD5.js.map +0 -1
  283. package/dist/web/assets/model-merger-BwRNqcBu.js.map +0 -1
  284. package/dist/web/assets/plugin-definition-CHD5r-h7.js.map +0 -1
  285. 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwB9B,CAAC"}
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"}
@@ -22,6 +22,7 @@ export const authRoutesGenerator = createGenerator({
22
22
  await builder.apply(renderers.mainGroup.render({
23
23
  variables: {},
24
24
  }));
25
+ await builder.apply(renderers.verifyEmail.render({}));
25
26
  },
26
27
  };
27
28
  },
@@ -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;oBACJ,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,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"}