@baseplate-dev/plugin-auth 4.0.3 → 5.0.1

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 (449) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +3 -3
  3. package/dist/auth/core/node.d.ts.map +1 -1
  4. package/dist/auth/core/node.js +2 -1
  5. package/dist/auth/core/node.js.map +1 -1
  6. package/dist/auth/core/schema/plugin-definition.d.ts +2 -12
  7. package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
  8. package/dist/auth/core/schema/roles/schema.d.ts +2 -12
  9. package/dist/auth/core/schema/roles/schema.d.ts.map +1 -1
  10. package/dist/auth/core/schema/roles/schema.js +10 -17
  11. package/dist/auth/core/schema/roles/schema.js.map +1 -1
  12. package/dist/auth/plugin.json +1 -1
  13. package/dist/better-auth/constants/model-names.d.ts +8 -0
  14. package/dist/better-auth/constants/model-names.d.ts.map +1 -0
  15. package/dist/better-auth/constants/model-names.js +8 -0
  16. package/dist/better-auth/constants/model-names.js.map +1 -0
  17. package/dist/better-auth/constants/packages.d.ts +4 -0
  18. package/dist/better-auth/constants/packages.d.ts.map +1 -0
  19. package/dist/better-auth/constants/packages.js +4 -0
  20. package/dist/better-auth/constants/packages.js.map +1 -0
  21. package/dist/better-auth/core/common.d.ts.map +1 -0
  22. package/dist/better-auth/core/common.js +17 -0
  23. package/dist/better-auth/core/common.js.map +1 -0
  24. package/dist/better-auth/core/components/better-auth-definition-editor.d.ts +5 -0
  25. package/dist/better-auth/core/components/better-auth-definition-editor.d.ts.map +1 -0
  26. package/dist/{auth0/core/components/auth0-definition-editor.js → better-auth/core/components/better-auth-definition-editor.js} +17 -17
  27. package/dist/better-auth/core/components/better-auth-definition-editor.js.map +1 -0
  28. package/dist/better-auth/core/index.d.ts +2 -0
  29. package/dist/better-auth/core/index.d.ts.map +1 -0
  30. package/dist/better-auth/core/index.js +2 -0
  31. package/dist/better-auth/core/index.js.map +1 -0
  32. package/dist/better-auth/core/node.d.ts.map +1 -0
  33. package/dist/{auth0 → better-auth}/core/node.js +16 -14
  34. package/dist/better-auth/core/node.js.map +1 -0
  35. package/dist/better-auth/core/schema/models.d.ts +3 -0
  36. package/dist/better-auth/core/schema/models.d.ts.map +1 -0
  37. package/dist/better-auth/core/schema/models.js +278 -0
  38. package/dist/better-auth/core/schema/models.js.map +1 -0
  39. package/dist/better-auth/core/schema/plugin-definition.d.ts +5 -0
  40. package/dist/better-auth/core/schema/plugin-definition.d.ts.map +1 -0
  41. package/dist/better-auth/core/schema/plugin-definition.js +4 -0
  42. package/dist/better-auth/core/schema/plugin-definition.js.map +1 -0
  43. package/dist/better-auth/core/web.d.ts.map +1 -0
  44. package/dist/{auth0 → better-auth}/core/web.js +2 -2
  45. package/dist/better-auth/core/web.js.map +1 -0
  46. package/dist/{auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts → better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts} +20 -26
  47. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts.map +1 -0
  48. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +75 -0
  49. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js.map +1 -0
  50. package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/index.d.ts +41 -26
  51. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts.map +1 -0
  52. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js +11 -0
  53. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js.map +1 -0
  54. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts +16 -0
  55. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts.map +1 -0
  56. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js +28 -0
  57. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js.map +1 -0
  58. package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/template-renderers.d.ts +16 -10
  59. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts.map +1 -0
  60. package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/template-renderers.js +35 -16
  61. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js.map +1 -0
  62. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts +30 -0
  63. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts.map +1 -0
  64. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js +37 -0
  65. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js.map +1 -0
  66. package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/typed-templates.d.ts +29 -20
  67. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts.map +1 -0
  68. package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/typed-templates.js +37 -9
  69. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js.map +1 -0
  70. package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts +4 -0
  71. package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts.map +1 -0
  72. package/dist/better-auth/generators/fastify/better-auth-module/index.js +3 -0
  73. package/dist/better-auth/generators/fastify/better-auth-module/index.js.map +1 -0
  74. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/plugins/better-auth.plugin.ts +31 -0
  75. package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/templates/module/schema/user-session.queries.ts +1 -1
  76. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +62 -0
  77. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/user-session.service.ts +72 -0
  78. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/utils/headers.utils.ts +21 -0
  79. package/dist/better-auth/generators/fastify/index.d.ts +2 -0
  80. package/dist/better-auth/generators/fastify/index.d.ts.map +1 -0
  81. package/dist/better-auth/generators/fastify/index.js +2 -0
  82. package/dist/better-auth/generators/fastify/index.js.map +1 -0
  83. package/dist/better-auth/generators/index.d.ts.map +1 -0
  84. package/dist/better-auth/generators/index.js.map +1 -0
  85. package/dist/{auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts → better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts} +11 -7
  86. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts.map +1 -0
  87. package/dist/{auth0/generators/react/auth0-hooks/auth0-hooks.generator.js → better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js} +8 -8
  88. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js.map +1 -0
  89. package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/index.d.ts +21 -8
  90. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts.map +1 -0
  91. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js +11 -0
  92. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js.map +1 -0
  93. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts +14 -0
  94. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts.map +1 -0
  95. package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/template-paths.js +9 -7
  96. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js.map +1 -0
  97. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts +27 -0
  98. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts.map +1 -0
  99. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js +43 -0
  100. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js.map +1 -0
  101. package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/ts-import-providers.d.ts +2 -2
  102. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
  103. package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/ts-import-providers.js +5 -5
  104. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js.map +1 -0
  105. package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/typed-templates.d.ts +21 -3
  106. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts.map +1 -0
  107. package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/typed-templates.js +7 -3
  108. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js.map +1 -0
  109. package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts +2 -0
  110. package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts.map +1 -0
  111. package/dist/better-auth/generators/react/better-auth-hooks/index.js +2 -0
  112. package/dist/better-auth/generators/react/better-auth-hooks/index.js.map +1 -0
  113. package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-log-out.ts +18 -0
  114. package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-session.ts +30 -0
  115. package/dist/{auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts → better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts} +15 -6
  116. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +1 -0
  117. package/dist/{auth0/generators/react/auth0-pages/auth0-pages.generator.js → better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js} +7 -7
  118. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js.map +1 -0
  119. package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/better-auth-pages}/generated/index.d.ts +246 -6
  120. package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/better-auth-pages}/generated/index.d.ts.map +1 -1
  121. package/dist/better-auth/generators/react/better-auth-pages/generated/index.js +9 -0
  122. package/dist/better-auth/generators/react/better-auth-pages/generated/index.js.map +1 -0
  123. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts +13 -0
  124. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts.map +1 -0
  125. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js +25 -0
  126. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js.map +1 -0
  127. package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/better-auth-pages}/generated/template-renderers.d.ts +13 -9
  128. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts.map +1 -0
  129. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js +44 -0
  130. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js.map +1 -0
  131. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +895 -0
  132. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts.map +1 -0
  133. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js +35 -0
  134. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js.map +1 -0
  135. package/dist/better-auth/generators/react/better-auth-pages/index.d.ts +2 -0
  136. package/dist/better-auth/generators/react/better-auth-pages/index.d.ts.map +1 -0
  137. package/dist/better-auth/generators/react/better-auth-pages/index.js +2 -0
  138. package/dist/better-auth/generators/react/better-auth-pages/index.js.map +1 -0
  139. package/dist/better-auth/generators/react/better-auth-pages/templates/routes/auth/login.tsx +146 -0
  140. package/dist/better-auth/generators/react/better-auth-pages/templates/routes/auth/register.tsx +162 -0
  141. package/dist/better-auth/generators/react/index.d.ts +4 -0
  142. package/dist/better-auth/generators/react/index.d.ts.map +1 -0
  143. package/dist/better-auth/generators/react/index.js +4 -0
  144. package/dist/better-auth/generators/react/index.js.map +1 -0
  145. package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/index.d.ts +42 -7
  146. package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/index.d.ts.map +1 -1
  147. package/dist/better-auth/generators/react/react-better-auth/generated/index.js +11 -0
  148. package/dist/better-auth/generators/react/react-better-auth/generated/index.js.map +1 -0
  149. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts +13 -0
  150. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts.map +1 -0
  151. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js +25 -0
  152. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js.map +1 -0
  153. package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/react-better-auth}/generated/template-renderers.d.ts +28 -9
  154. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts.map +1 -0
  155. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js +51 -0
  156. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js.map +1 -0
  157. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts +21 -0
  158. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts.map +1 -0
  159. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js +30 -0
  160. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js.map +1 -0
  161. package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/typed-templates.d.ts +16 -2
  162. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts.map +1 -0
  163. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js +33 -0
  164. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js.map +1 -0
  165. package/dist/better-auth/generators/react/react-better-auth/index.d.ts +4 -0
  166. package/dist/better-auth/generators/react/react-better-auth/index.d.ts.map +1 -0
  167. package/dist/better-auth/generators/react/react-better-auth/index.js +3 -0
  168. package/dist/better-auth/generators/react/react-better-auth/index.js.map +1 -0
  169. package/dist/{auth0/generators/react/react-auth0/react-auth0.generator.d.ts → better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts} +28 -25
  170. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts.map +1 -0
  171. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js +74 -0
  172. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js.map +1 -0
  173. package/dist/better-auth/generators/react/react-better-auth/templates/src/app/auth-loaded-gate.tsx +58 -0
  174. package/dist/better-auth/generators/react/react-better-auth/templates/src/services/auth-client.ts +15 -0
  175. package/dist/better-auth/index.d.ts +3 -0
  176. package/dist/better-auth/index.d.ts.map +1 -0
  177. package/dist/better-auth/index.js +2 -0
  178. package/dist/better-auth/index.js.map +1 -0
  179. package/dist/better-auth/plugin.json +9 -0
  180. package/dist/better-auth/static/icon.svg +10 -0
  181. package/dist/index.d.ts +1 -0
  182. package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -1
  183. package/dist/local-auth/core/components/local-auth-definition-editor.js +11 -11
  184. package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
  185. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +2 -2
  186. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +4 -4
  187. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js +1 -1
  188. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +1 -1
  189. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.ts +1 -1
  190. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +3 -1
  191. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -1
  192. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +6 -1
  193. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -1
  194. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +8 -2
  195. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +1 -0
  196. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
  197. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +14 -3
  198. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
  199. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +1 -1
  200. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -1
  201. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +1 -1
  202. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +1 -1
  203. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -1
  204. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +1 -1
  205. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +34 -15
  206. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +1 -1
  207. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +58 -15
  208. package/dist/local-auth/core/node.d.ts.map +1 -1
  209. package/dist/local-auth/core/node.js +8 -6
  210. package/dist/local-auth/core/node.js.map +1 -1
  211. package/dist/local-auth/core/schema/models.d.ts +2 -4
  212. package/dist/local-auth/core/schema/models.d.ts.map +1 -1
  213. package/dist/local-auth/core/schema/models.js +254 -252
  214. package/dist/local-auth/core/schema/models.js.map +1 -1
  215. package/dist/local-auth/core/schema/plugin-definition.d.ts +2 -2
  216. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -1
  217. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +11 -11
  218. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -1
  219. package/dist/placeholder-auth/core/schema/models.d.ts +2 -4
  220. package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -1
  221. package/dist/placeholder-auth/core/schema/models.js +30 -28
  222. package/dist/placeholder-auth/core/schema/models.js.map +1 -1
  223. package/dist/web/assets/{__federation_expose_authCoreCommon-Bg2mzE9K.js → __federation_expose_authCoreCommon-CIVhaGqo.js} +3 -3
  224. package/dist/web/assets/{__federation_expose_authCoreCommon-Bg2mzE9K.js.map → __federation_expose_authCoreCommon-CIVhaGqo.js.map} +1 -1
  225. package/dist/web/assets/{__federation_expose_authCoreWeb-DrOVHmj4.js → __federation_expose_authCoreWeb-N-mh42Bs.js} +6 -6
  226. package/dist/web/assets/{__federation_expose_authCoreWeb-DrOVHmj4.js.map → __federation_expose_authCoreWeb-N-mh42Bs.js.map} +1 -1
  227. package/dist/web/assets/__federation_expose_better-authCoreCommon-BIU3Fg7K.js +20 -0
  228. package/dist/web/assets/__federation_expose_better-authCoreCommon-BIU3Fg7K.js.map +1 -0
  229. package/dist/web/assets/__federation_expose_better-authCoreWeb-CMhPrXPA.js +402 -0
  230. package/dist/web/assets/__federation_expose_better-authCoreWeb-CMhPrXPA.js.map +1 -0
  231. package/dist/web/assets/{__federation_expose_local-authAdminCommon-Bzb0P17-.js → __federation_expose_local-authAdminCommon-DvHe9w29.js} +2 -2
  232. package/dist/web/assets/{__federation_expose_local-authAdminCommon-Bzb0P17-.js.map → __federation_expose_local-authAdminCommon-DvHe9w29.js.map} +1 -1
  233. package/dist/web/assets/{__federation_expose_local-authAdminWeb-D_LWcl7j.js → __federation_expose_local-authAdminWeb-CLU9aEy9.js} +2 -2
  234. package/dist/web/assets/{__federation_expose_local-authAdminWeb-D_LWcl7j.js.map → __federation_expose_local-authAdminWeb-CLU9aEy9.js.map} +1 -1
  235. package/dist/web/assets/{__federation_expose_local-authCoreCommon-D6OG-Rz6.js → __federation_expose_local-authCoreCommon-DbuvGG7o.js} +3 -3
  236. package/dist/web/assets/{__federation_expose_local-authCoreCommon-D6OG-Rz6.js.map → __federation_expose_local-authCoreCommon-DbuvGG7o.js.map} +1 -1
  237. package/dist/web/assets/__federation_expose_local-authCoreWeb-BY-mP3uS.js +432 -0
  238. package/dist/web/assets/__federation_expose_local-authCoreWeb-BY-mP3uS.js.map +1 -0
  239. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-D7b3GEPP.js → __federation_expose_placeholder-authCoreCommon-BJBCuZvU.js} +3 -3
  240. package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-D7b3GEPP.js.map → __federation_expose_placeholder-authCoreCommon-BJBCuZvU.js.map} +1 -1
  241. package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-VZzvid5j.js → __federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js} +61 -53
  242. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js.map +1 -0
  243. package/dist/web/assets/{__federation_fn_import-DfNliZHH.js → __federation_fn_import-BLFDCY-V.js} +2 -2
  244. package/dist/web/assets/{__federation_fn_import-DfNliZHH.js.map → __federation_fn_import-BLFDCY-V.js.map} +1 -1
  245. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BqJ1vSYx.js → web-bRU6KpPk.js} +48 -26
  246. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-bRU6KpPk.js.map +1 -0
  247. package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-qf98MMJC.js → project-builder-lib-CQKLkNsU.js} +5705 -1957
  248. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CQKLkNsU.js.map +1 -0
  249. package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-DFkMnXmX.js → ui-components-DhyoEUTy.js} +5886 -1191
  250. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DhyoEUTy.js.map +1 -0
  251. package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-CApJheqk.js → utils-9w-0yxVZ.js} +64 -45
  252. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-9w-0yxVZ.js.map +1 -0
  253. package/dist/web/assets/__federation_shared_@tanstack/{react-router-YQslfDyE.js → react-router-CbExBaoL.js} +2 -2
  254. package/dist/web/assets/__federation_shared_@tanstack/{react-router-YQslfDyE.js.map → react-router-CbExBaoL.js.map} +1 -1
  255. package/dist/web/assets/{__federation_shared_zod-B6wbpZ4f.js → __federation_shared_zod-Do7Aa1b5.js} +3431 -2188
  256. package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js.map +1 -0
  257. package/dist/web/assets/{get-auth-plugin-definition-CVuj_mvy.js → get-auth-plugin-definition-BL50g0cJ.js} +2 -2
  258. package/dist/web/assets/{get-auth-plugin-definition-CVuj_mvy.js.map → get-auth-plugin-definition-BL50g0cJ.js.map} +1 -1
  259. package/dist/web/assets/{index-B00D4irM.js → index-B_A3cgiy.js} +2 -2
  260. package/dist/web/assets/{index-B00D4irM.js.map → index-B_A3cgiy.js.map} +1 -1
  261. package/dist/web/assets/{index.esm-1qBxxnfu.js → index.esm-BraHxHLB.js} +338 -231
  262. package/dist/web/assets/index.esm-BraHxHLB.js.map +1 -0
  263. package/dist/web/assets/{isEqual-BQtm2LNT.js → isEqual-tnzoadW8.js} +18 -18
  264. package/dist/web/assets/isEqual-tnzoadW8.js.map +1 -0
  265. package/dist/web/assets/mergeWith-VagwCqUi.js +76 -0
  266. package/dist/web/assets/mergeWith-VagwCqUi.js.map +1 -0
  267. package/dist/web/assets/model-utils-BfcjfzCn.js +694 -0
  268. package/dist/web/assets/model-utils-BfcjfzCn.js.map +1 -0
  269. package/dist/web/assets/plugin-definition-CXnKUJ1l.js +20 -0
  270. package/dist/web/assets/plugin-definition-CXnKUJ1l.js.map +1 -0
  271. package/dist/web/assets/{plugin-definition-CcdhC0td.js → plugin-definition-Ckl5hjD1.js} +2 -2
  272. package/dist/web/assets/{plugin-definition-CcdhC0td.js.map → plugin-definition-Ckl5hjD1.js.map} +1 -1
  273. package/dist/web/assets/{plugin-definition-B_hlyPlm.js → plugin-definition-D26rR8AB.js} +2 -2
  274. package/dist/web/assets/{plugin-definition-B_hlyPlm.js.map → plugin-definition-D26rR8AB.js.map} +1 -1
  275. package/dist/web/assets/{plugin-definition-BKCeZ0Ni.js → plugin-definition-DJzXScRp.js} +12 -19
  276. package/dist/web/assets/plugin-definition-DJzXScRp.js.map +1 -0
  277. package/dist/web/assets/{react-Df9ccuow.js → react-CL9M_wyN.js} +2 -2
  278. package/dist/web/assets/{react-Df9ccuow.js.map → react-CL9M_wyN.js.map} +1 -1
  279. package/dist/web/assets/{registries-19UehlAo.js → registries-Tz_dluz3.js} +51 -13
  280. package/dist/web/assets/registries-Tz_dluz3.js.map +1 -0
  281. package/dist/web/assets/remoteEntry.js +14 -14
  282. package/dist/web/assets/{styles-CbPVroCT.js → styles-tkrWV-ZE.js} +4 -4
  283. package/dist/web/assets/{styles-CbPVroCT.js.map → styles-tkrWV-ZE.js.map} +1 -1
  284. package/package.json +17 -17
  285. package/dist/auth0/constants/model-names.d.ts +0 -4
  286. package/dist/auth0/constants/model-names.d.ts.map +0 -1
  287. package/dist/auth0/constants/model-names.js +0 -4
  288. package/dist/auth0/constants/model-names.js.map +0 -1
  289. package/dist/auth0/constants/packages.d.ts +0 -6
  290. package/dist/auth0/constants/packages.d.ts.map +0 -1
  291. package/dist/auth0/constants/packages.js +0 -6
  292. package/dist/auth0/constants/packages.js.map +0 -1
  293. package/dist/auth0/core/common.d.ts.map +0 -1
  294. package/dist/auth0/core/common.js +0 -19
  295. package/dist/auth0/core/common.js.map +0 -1
  296. package/dist/auth0/core/components/auth0-definition-editor.d.ts +0 -5
  297. package/dist/auth0/core/components/auth0-definition-editor.d.ts.map +0 -1
  298. package/dist/auth0/core/components/auth0-definition-editor.js.map +0 -1
  299. package/dist/auth0/core/node.d.ts.map +0 -1
  300. package/dist/auth0/core/node.js.map +0 -1
  301. package/dist/auth0/core/schema/migrations.d.ts +0 -3
  302. package/dist/auth0/core/schema/migrations.d.ts.map +0 -1
  303. package/dist/auth0/core/schema/migrations.js +0 -19
  304. package/dist/auth0/core/schema/migrations.js.map +0 -1
  305. package/dist/auth0/core/schema/models.d.ts +0 -5
  306. package/dist/auth0/core/schema/models.d.ts.map +0 -1
  307. package/dist/auth0/core/schema/models.js +0 -40
  308. package/dist/auth0/core/schema/models.js.map +0 -1
  309. package/dist/auth0/core/schema/plugin-definition.d.ts +0 -5
  310. package/dist/auth0/core/schema/plugin-definition.d.ts.map +0 -1
  311. package/dist/auth0/core/schema/plugin-definition.js +0 -4
  312. package/dist/auth0/core/schema/plugin-definition.js.map +0 -1
  313. package/dist/auth0/core/web.d.ts.map +0 -1
  314. package/dist/auth0/core/web.js.map +0 -1
  315. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +0 -1
  316. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +0 -114
  317. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +0 -1
  318. package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +0 -1
  319. package/dist/auth0/generators/fastify/auth0-module/generated/index.js +0 -11
  320. package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +0 -1
  321. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +0 -14
  322. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +0 -1
  323. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +0 -24
  324. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +0 -1
  325. package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +0 -1
  326. package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js.map +0 -1
  327. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts +0 -10
  328. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts.map +0 -1
  329. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js +0 -23
  330. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js.map +0 -1
  331. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +0 -1
  332. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +0 -1
  333. package/dist/auth0/generators/fastify/auth0-module/index.d.ts +0 -2
  334. package/dist/auth0/generators/fastify/auth0-module/index.d.ts.map +0 -1
  335. package/dist/auth0/generators/fastify/auth0-module/index.js +0 -2
  336. package/dist/auth0/generators/fastify/auth0-module/index.js.map +0 -1
  337. package/dist/auth0/generators/fastify/auth0-module/templates/module/services/management.ts +0 -22
  338. package/dist/auth0/generators/fastify/auth0-module/templates/module/services/user-session.service.ts +0 -101
  339. package/dist/auth0/generators/fastify/index.d.ts +0 -2
  340. package/dist/auth0/generators/fastify/index.d.ts.map +0 -1
  341. package/dist/auth0/generators/fastify/index.js +0 -2
  342. package/dist/auth0/generators/fastify/index.js.map +0 -1
  343. package/dist/auth0/generators/index.d.ts.map +0 -1
  344. package/dist/auth0/generators/index.js.map +0 -1
  345. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts +0 -10
  346. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts.map +0 -1
  347. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js +0 -41
  348. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js.map +0 -1
  349. package/dist/auth0/generators/react/auth0-apollo/index.d.ts +0 -2
  350. package/dist/auth0/generators/react/auth0-apollo/index.d.ts.map +0 -1
  351. package/dist/auth0/generators/react/auth0-apollo/index.js +0 -2
  352. package/dist/auth0/generators/react/auth0-apollo/index.js.map +0 -1
  353. package/dist/auth0/generators/react/auth0-apollo/templates/auth-link.ts +0 -11
  354. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +0 -1
  355. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +0 -1
  356. package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +0 -1
  357. package/dist/auth0/generators/react/auth0-hooks/generated/index.js +0 -11
  358. package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +0 -1
  359. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +0 -14
  360. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +0 -1
  361. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +0 -1
  362. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +0 -23
  363. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +0 -1
  364. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +0 -38
  365. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +0 -1
  366. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +0 -1
  367. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +0 -1
  368. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +0 -1
  369. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +0 -1
  370. package/dist/auth0/generators/react/auth0-hooks/index.d.ts +0 -2
  371. package/dist/auth0/generators/react/auth0-hooks/index.d.ts.map +0 -1
  372. package/dist/auth0/generators/react/auth0-hooks/index.js +0 -2
  373. package/dist/auth0/generators/react/auth0-hooks/index.js.map +0 -1
  374. package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-log-out.ts +0 -14
  375. package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-session.ts +0 -36
  376. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +0 -1
  377. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.js.map +0 -1
  378. package/dist/auth0/generators/react/auth0-pages/generated/index.js +0 -9
  379. package/dist/auth0/generators/react/auth0-pages/generated/index.js.map +0 -1
  380. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts +0 -12
  381. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts.map +0 -1
  382. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js +0 -20
  383. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js.map +0 -1
  384. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +0 -1
  385. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js +0 -37
  386. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js.map +0 -1
  387. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +0 -433
  388. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +0 -1
  389. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js +0 -18
  390. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js.map +0 -1
  391. package/dist/auth0/generators/react/auth0-pages/index.d.ts +0 -2
  392. package/dist/auth0/generators/react/auth0-pages/index.d.ts.map +0 -1
  393. package/dist/auth0/generators/react/auth0-pages/index.js +0 -2
  394. package/dist/auth0/generators/react/auth0-pages/index.js.map +0 -1
  395. package/dist/auth0/generators/react/auth0-pages/templates/routes/login.tsx +0 -31
  396. package/dist/auth0/generators/react/index.d.ts +0 -5
  397. package/dist/auth0/generators/react/index.d.ts.map +0 -1
  398. package/dist/auth0/generators/react/index.js +0 -5
  399. package/dist/auth0/generators/react/index.js.map +0 -1
  400. package/dist/auth0/generators/react/react-auth0/generated/index.js +0 -9
  401. package/dist/auth0/generators/react/react-auth0/generated/index.js.map +0 -1
  402. package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts +0 -12
  403. package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts.map +0 -1
  404. package/dist/auth0/generators/react/react-auth0/generated/template-paths.js +0 -22
  405. package/dist/auth0/generators/react/react-auth0/generated/template-paths.js.map +0 -1
  406. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +0 -1
  407. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js +0 -39
  408. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js.map +0 -1
  409. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +0 -1
  410. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js +0 -17
  411. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js.map +0 -1
  412. package/dist/auth0/generators/react/react-auth0/index.d.ts +0 -2
  413. package/dist/auth0/generators/react/react-auth0/index.d.ts.map +0 -1
  414. package/dist/auth0/generators/react/react-auth0/index.js +0 -2
  415. package/dist/auth0/generators/react/react-auth0/index.js.map +0 -1
  416. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +0 -1
  417. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js +0 -107
  418. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js.map +0 -1
  419. package/dist/auth0/generators/react/react-auth0/templates/src/app/auth-loaded-gate.tsx +0 -78
  420. package/dist/auth0/plugin.json +0 -9
  421. package/dist/auth0/static/icon.svg +0 -7
  422. package/dist/web/assets/__federation_expose_auth0CoreCommon-e_GtBIIm.js +0 -40
  423. package/dist/web/assets/__federation_expose_auth0CoreCommon-e_GtBIIm.js.map +0 -1
  424. package/dist/web/assets/__federation_expose_auth0CoreWeb-CTfPylMw.js +0 -158
  425. package/dist/web/assets/__federation_expose_auth0CoreWeb-CTfPylMw.js.map +0 -1
  426. package/dist/web/assets/__federation_expose_local-authCoreWeb-CaR8fx1f.js +0 -424
  427. package/dist/web/assets/__federation_expose_local-authCoreWeb-CaR8fx1f.js.map +0 -1
  428. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-VZzvid5j.js.map +0 -1
  429. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BqJ1vSYx.js.map +0 -1
  430. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-qf98MMJC.js.map +0 -1
  431. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DFkMnXmX.js.map +0 -1
  432. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CApJheqk.js.map +0 -1
  433. package/dist/web/assets/__federation_shared_zod-B6wbpZ4f.js.map +0 -1
  434. package/dist/web/assets/index.esm-1qBxxnfu.js.map +0 -1
  435. package/dist/web/assets/isEqual-BQtm2LNT.js.map +0 -1
  436. package/dist/web/assets/model-merger-59HLmy_J.js +0 -1705
  437. package/dist/web/assets/model-merger-59HLmy_J.js.map +0 -1
  438. package/dist/web/assets/plugin-definition-BKCeZ0Ni.js.map +0 -1
  439. package/dist/web/assets/plugin-definition-Bkx-a_wA.js +0 -16
  440. package/dist/web/assets/plugin-definition-Bkx-a_wA.js.map +0 -1
  441. package/dist/web/assets/registries-19UehlAo.js.map +0 -1
  442. package/dist/web/assets/sortBy-BPH_zRB8.js +0 -34
  443. package/dist/web/assets/sortBy-BPH_zRB8.js.map +0 -1
  444. /package/dist/{auth0 → better-auth}/core/common.d.ts +0 -0
  445. /package/dist/{auth0 → better-auth}/core/node.d.ts +0 -0
  446. /package/dist/{auth0 → better-auth}/core/web.d.ts +0 -0
  447. /package/dist/{auth0 → better-auth}/generators/index.d.ts +0 -0
  448. /package/dist/{auth0 → better-auth}/generators/index.js +0 -0
  449. /package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/templates/src/hooks/use-required-user-id.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @baseplate-dev/plugin-auth
2
2
 
3
+ ## 5.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`c371612`](https://github.com/halfdomelabs/baseplate/commit/c37161281c660a799a2a74537cd751fd58f3b05f), [`0b973f3`](https://github.com/halfdomelabs/baseplate/commit/0b973f3b9cb03fa1c49ceb49839b210466ecbbc7)]:
8
+ - @baseplate-dev/fastify-generators@0.6.1
9
+ - @baseplate-dev/plugin-email@1.0.1
10
+ - @baseplate-dev/plugin-queue@3.0.1
11
+ - @baseplate-dev/plugin-rate-limit@1.0.1
12
+ - @baseplate-dev/core-generators@0.6.1
13
+ - @baseplate-dev/project-builder-lib@0.6.1
14
+ - @baseplate-dev/react-generators@0.6.1
15
+ - @baseplate-dev/sync@0.6.1
16
+ - @baseplate-dev/ui-components@0.6.1
17
+ - @baseplate-dev/utils@0.6.1
18
+
19
+ ## 5.0.0
20
+
21
+ ### Patch Changes
22
+
23
+ - [#791](https://github.com/halfdomelabs/baseplate/pull/791) [`cad5352`](https://github.com/halfdomelabs/baseplate/commit/cad535239b47080e30f894383cc330e37213a76c) Thanks [@kingston](https://github.com/kingston)! - Add Better Auth implementation plugin with backend (Fastify) and frontend (React) generators. Removes Auth0 implementation plugin.
24
+
25
+ - [#802](https://github.com/halfdomelabs/baseplate/pull/802) [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad) Thanks [@kingston](https://github.com/kingston)! - Update prettier to ignore unchanged files in output
26
+
27
+ - [#778](https://github.com/halfdomelabs/baseplate/pull/778) [`d6be7a9`](https://github.com/halfdomelabs/baseplate/commit/d6be7a97b5e6970be674bf9b49eddf1499b51f04) Thanks [@kingston](https://github.com/kingston)! - Upgrade packages to fix security vulnerabilities
28
+ - @aws-sdk/client-s3, @aws-sdk/lib-storage, @aws-sdk/s3-presigned-post, @aws-sdk/s3-request-presigner: 3.990.0 → 3.995.0 (fixes fast-xml-parser CVE-2025-69873 critical, CVE DoS high)
29
+ - postmark: 4.0.5 → 4.0.7 (fixes axios DoS vulnerability)
30
+ - fastify-auth0-verify: 3.0.0 → 4.1.0 (updates @fastify/jwt to v10)
31
+
32
+ - [#788](https://github.com/halfdomelabs/baseplate/pull/788) [`3b3be2b`](https://github.com/halfdomelabs/baseplate/commit/3b3be2b8d45b08552dca3d4e2b5ce391a958341b) Thanks [@kingston](https://github.com/kingston)! - Replace model-specific merger with generic schema-driven definition patcher
33
+
34
+ - [#796](https://github.com/halfdomelabs/baseplate/pull/796) [`8258b27`](https://github.com/halfdomelabs/baseplate/commit/8258b278e9a25a6e4bd5039a134238d071a63ecd) Thanks [@kingston](https://github.com/kingston)! - Add query filter code generation for instance-level authorization on GraphQL queries
35
+
36
+ - [#803](https://github.com/halfdomelabs/baseplate/pull/803) [`b7b4cb1`](https://github.com/halfdomelabs/baseplate/commit/b7b4cb1f570cb8fa71a954b4d1d62807f64bea63) Thanks [@kingston](https://github.com/kingston)! - Make `validatePasswordResetToken` throw on invalid tokens and handle errors in the frontend
37
+
38
+ - [#785](https://github.com/halfdomelabs/baseplate/pull/785) [`bd25ff0`](https://github.com/halfdomelabs/baseplate/commit/bd25ff08e71faeb97b560e7b349dba1967155704) Thanks [@kingston](https://github.com/kingston)! - Remove redundant `.optional()` wrapper from `withDefault`
39
+
40
+ `withDefault` previously wrapped the schema in both `.prefault()` and `.optional()`. Since `.prefault()` already makes fields accept absent/undefined input, the `.optional()` was redundant and caused the output type to incorrectly include `| undefined` for defaulted fields.
41
+
42
+ - Updated dependencies [[`ee7ee0e`](https://github.com/halfdomelabs/baseplate/commit/ee7ee0e552090612190eb4446a52c30f4eefce6a), [`bd1095e`](https://github.com/halfdomelabs/baseplate/commit/bd1095e52dc3cecdb40bf84a906490a7c92fec40), [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad), [`1225fda`](https://github.com/halfdomelabs/baseplate/commit/1225fdace3e8da20152e0e78c4decf0c063faa56), [`3029d42`](https://github.com/halfdomelabs/baseplate/commit/3029d42f5d5967721f2b0d5892ea07a80c5f3a1f), [`dfa9638`](https://github.com/halfdomelabs/baseplate/commit/dfa963825c4ba847f9d21f4f014c4dd1722403d6), [`d6be7a9`](https://github.com/halfdomelabs/baseplate/commit/d6be7a97b5e6970be674bf9b49eddf1499b51f04), [`3b3be2b`](https://github.com/halfdomelabs/baseplate/commit/3b3be2b8d45b08552dca3d4e2b5ce391a958341b), [`eadad84`](https://github.com/halfdomelabs/baseplate/commit/eadad8494128ded2cbc76dfbe3b97f93769ea41f), [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad), [`ee7ee0e`](https://github.com/halfdomelabs/baseplate/commit/ee7ee0e552090612190eb4446a52c30f4eefce6a), [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad), [`dc238be`](https://github.com/halfdomelabs/baseplate/commit/dc238be00158a528a60d9e6ef9cec32b2d8297be), [`bd25ff0`](https://github.com/halfdomelabs/baseplate/commit/bd25ff08e71faeb97b560e7b349dba1967155704), [`8258b27`](https://github.com/halfdomelabs/baseplate/commit/8258b278e9a25a6e4bd5039a134238d071a63ecd), [`6e2675d`](https://github.com/halfdomelabs/baseplate/commit/6e2675d2166ac9bf470486efdc6a0e48df9bcc6d), [`634f6c5`](https://github.com/halfdomelabs/baseplate/commit/634f6c5aaffab982a985be9f85062de9d1e8a99b), [`2f860c5`](https://github.com/halfdomelabs/baseplate/commit/2f860c513a1caf95fdfd0729cf548990166f9a6f), [`cad5352`](https://github.com/halfdomelabs/baseplate/commit/cad535239b47080e30f894383cc330e37213a76c), [`83c713b`](https://github.com/halfdomelabs/baseplate/commit/83c713b075eca2abc946e74bf3f03e515e601eba), [`78315cc`](https://github.com/halfdomelabs/baseplate/commit/78315ccd9b0b0330cd2d08584c6d5ec516d641e3), [`2104145`](https://github.com/halfdomelabs/baseplate/commit/210414588d8b1f6816c45054be3b7eea5763b5ce), [`bd25ff0`](https://github.com/halfdomelabs/baseplate/commit/bd25ff08e71faeb97b560e7b349dba1967155704), [`cad5352`](https://github.com/halfdomelabs/baseplate/commit/cad535239b47080e30f894383cc330e37213a76c)]:
43
+ - @baseplate-dev/utils@0.6.0
44
+ - @baseplate-dev/project-builder-lib@0.6.0
45
+ - @baseplate-dev/fastify-generators@0.6.0
46
+ - @baseplate-dev/react-generators@0.6.0
47
+ - @baseplate-dev/plugin-rate-limit@1.0.0
48
+ - @baseplate-dev/core-generators@0.6.0
49
+ - @baseplate-dev/ui-components@0.6.0
50
+ - @baseplate-dev/plugin-email@1.0.0
51
+ - @baseplate-dev/plugin-queue@3.0.0
52
+ - @baseplate-dev/sync@0.6.0
53
+
3
54
  ## 4.0.3
4
55
 
5
56
  ### Patch Changes
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @baseplate-dev/plugin-auth
2
2
 
3
- This plugin provides authentication capabilities for Baseplate projects, including both local authentication and Auth0 integration.
3
+ This plugin provides authentication capabilities for Baseplate projects, including both local authentication and Better Auth integration.
4
4
 
5
5
  ## Purpose
6
6
 
7
7
  The plugin-auth package provides:
8
8
 
9
- - Multiple authentication strategies (local auth and Auth0)
9
+ - Multiple authentication strategies (local auth and Better Auth)
10
10
  - User session management via cookies
11
11
  - Role-based access control (RBAC)
12
12
  - Authentication UI components
@@ -16,7 +16,7 @@ The plugin-auth package provides:
16
16
  ## Features
17
17
 
18
18
  - **Local Authentication**: Email/password authentication with session management
19
- - **Auth0 Integration**: Full Auth0 authentication flow with callback handling
19
+ - **Better Auth Integration**: Full Better Auth authentication flow with callback handling
20
20
  - **Role Management**: Define and manage user roles and permissions
21
21
  - **Session Handling**: Secure cookie-based sessions with CSRF protection
22
22
  - **React Components**: Pre-built authentication UI components
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/auth/core/node.ts"],"names":[],"mappings":";;;AAsBA,wBAgDG"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/auth/core/node.ts"],"names":[],"mappings":";;;AAuBA,wBAiDG"}
@@ -1,4 +1,4 @@
1
- import { authContextGenerator, authPluginGenerator, authRolesGenerator, pothosAuthGenerator, prismaAuthorizerUtilsGenerator, userSessionTypesGenerator, } from '@baseplate-dev/fastify-generators';
1
+ import { authContextGenerator, authPluginGenerator, authRolesGenerator, pothosAuthGenerator, prismaAuthorizerUtilsGenerator, prismaQueryFilterUtilsGenerator, userSessionTypesGenerator, } from '@baseplate-dev/fastify-generators';
2
2
  import { appCompilerSpec, backendAppEntryType, createPluginModule, PluginUtils, webAppEntryType, } from '@baseplate-dev/project-builder-lib';
3
3
  import { authErrorsGenerator, authIdentifyGenerator, } from '@baseplate-dev/react-generators';
4
4
  export default createPluginModule({
@@ -28,6 +28,7 @@ export default createPluginModule({
28
28
  appCompiler.addRootChildren({
29
29
  pothosAuth: pothosAuthGenerator({}),
30
30
  authorizerUtils: prismaAuthorizerUtilsGenerator({}),
31
+ queryFilterUtils: prismaQueryFilterUtilsGenerator({}),
31
32
  });
32
33
  },
33
34
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/auth/core/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAIzC,eAAe,kBAAkB,CAAC;IAChC,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE;QACZ,WAAW,EAAE,eAAe;KAC7B;IACD,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7C,4BAA4B;QAC5B,WAAW,CAAC,SAAS,CAAC,IAAI,CACxB;YACE,SAAS;YACT,OAAO,EAAE,mBAAmB;YAC5B,OAAO,EAAE,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAE,EAAE,EAAE;gBAC9C,MAAM,IAAI,GAAG,WAAW,CAAC,kBAAkB,CACzC,iBAAiB,EACjB,SAAS,CACc,CAAC;gBAE1B,WAAW,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,EAAE;oBACpD,WAAW,EAAE,oBA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WAAW,CAAC,eAAe,CAAC;oBAC1B,YAAY,EAAE,qBAAqB,CAAC,EAAE,CAAC;oBACvC,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC;iBACpC,CAAC,CAAC;YACL,CAAC;SACF,CACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  export declare const createAuthPluginDefinitionSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodObject<{
4
4
  implementationPluginKey: z.ZodString;
5
5
  authFeatureRef: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
6
- roles: z.ZodPipe<z.ZodArray<z.ZodType<{
6
+ roles: z.ZodArray<z.ZodType<{
7
7
  id: string;
8
8
  name: string;
9
9
  comment: string;
@@ -23,17 +23,7 @@ export declare const createAuthPluginDefinitionSchema: (context: import("@basepl
23
23
  name: string;
24
24
  comment: string;
25
25
  builtIn?: boolean | undefined;
26
- }>>>, z.ZodTransform<{
27
- id: string;
28
- name: string;
29
- comment: string;
30
- builtIn: boolean;
31
- }[], {
32
- id: string;
33
- name: string;
34
- comment: string;
35
- builtIn: boolean;
36
- }[]>>;
26
+ }>>>;
37
27
  }, z.core.$strip>;
38
28
  export type AuthPluginDefinition = def.InferOutput<typeof createAuthPluginDefinitionSchema>;
39
29
  export type AuthPluginDefinitionInput = def.InferInput<typeof createAuthPluginDefinitionSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAM9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW5C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,WAAW,CAChD,OAAO,gCAAgC,CACxC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,UAAU,CACpD,OAAO,gCAAgC,CACxC,CAAC"}
1
+ {"version":3,"file":"plugin-definition.d.ts","sourceRoot":"","sources":["../../../../src/auth/core/schema/plugin-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAM9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;iBAW5C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,WAAW,CAChD,OAAO,gCAAgC,CACxC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,UAAU,CACpD,OAAO,gCAAgC,CACxC,CAAC"}
@@ -30,7 +30,7 @@ export type AuthRoleInput = def.InferInput<typeof createAuthRoleSchema>;
30
30
  * Defines the schema for an array of roles ensuring that there are no duplicate
31
31
  * role names and that the built-in roles are included.
32
32
  */
33
- export declare const createAuthRolesSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodPipe<z.ZodArray<z.ZodType<{
33
+ export declare const createAuthRolesSchema: (context: import("@baseplate-dev/project-builder-lib").DefinitionSchemaParserContext) => z.ZodArray<z.ZodType<{
34
34
  id: string;
35
35
  name: string;
36
36
  comment: string;
@@ -50,15 +50,5 @@ export declare const createAuthRolesSchema: (context: import("@baseplate-dev/pro
50
50
  name: string;
51
51
  comment: string;
52
52
  builtIn?: boolean | undefined;
53
- }>>>, z.ZodTransform<{
54
- id: string;
55
- name: string;
56
- comment: string;
57
- builtIn: boolean;
58
- }[], {
59
- id: string;
60
- name: string;
61
- comment: string;
62
- builtIn: boolean;
63
- }[]>>;
53
+ }>>>;
64
54
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/auth/core/schema/roles/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAM9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;GAUhC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCjC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/auth/core/schema/roles/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAM9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;GAUhC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;IAwBjC,CAAC"}
@@ -24,21 +24,14 @@ export const createAuthRolesSchema = definitionSchema((ctx) => z
24
24
  });
25
25
  }
26
26
  })
27
- .transform((roles) => [
28
- ...AUTH_DEFAULT_ROLES.map((r) => {
29
- const existingRole = roles.find((role) => role.name === r.name);
30
- return existingRole
31
- ? {
32
- ...existingRole,
33
- builtIn: true,
34
- }
35
- : {
36
- ...r,
37
- builtIn: true,
38
- id: authRoleEntityType.generateNewId(),
39
- };
40
- }),
41
- // Filter out the built-in roles
42
- ...roles.filter((r) => !AUTH_DEFAULT_ROLES.map((v) => v.name).includes(r.name)),
43
- ]));
27
+ .superRefine((roles, ctx) => {
28
+ for (const defaultRole of AUTH_DEFAULT_ROLES) {
29
+ if (!roles.some((r) => r.name === defaultRole.name && r.builtIn)) {
30
+ ctx.addIssue({
31
+ code: 'custom',
32
+ message: `Missing built-in role: ${defaultRole.name}`,
33
+ });
34
+ }
35
+ }
36
+ }));
44
37
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../src/auth/core/schema/roles/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,CAAC,GAAG,EAAE,EAAE,CAC3D,GAAG,CAAC,OAAO,CACT,CAAC,CAAC,MAAM,CAAC;IACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACpC,CAAC,EACF,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAC7B,CACF,CAAC;AASF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,CAAC,GAAG,EAAE,EAAE,CAC5D,CAAC;KACE,KAAK,CAAC,oBAAoB,CAAC,GAAG,CA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I,EAAE,QAAQ;YACd,OAAO,EAAE,2BAA2B,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;KACD,WAAW,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC1B,KAAK,MAAM,WAAW,IAAI,kBAAkB,EAAE,CAAC;QAC7C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;YACjE,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,0BAA0B,WAAW,CAAC,IAAI,EAAE;aACtD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC,CAAC,CACL,CAAC"}
@@ -2,7 +2,7 @@
2
2
  "name": "auth",
3
3
  "displayName": "Authentication",
4
4
  "icon": "icon.svg",
5
- "description": "Manages user authentication and authorization for your application. This is a base plugin that requires an authentication implementation (Local Auth, Auth0, etc.)",
5
+ "description": "Manages user authentication and authorization for your application. This is a base plugin that requires an authentication implementation (Local Auth, Better Auth, etc.)",
6
6
  "version": "0.1.0",
7
7
  "moduleDirectories": ["core"]
8
8
  }
@@ -0,0 +1,8 @@
1
+ export declare const BETTER_AUTH_MODELS: {
2
+ readonly user: "User";
3
+ readonly session: "Session";
4
+ readonly account: "Account";
5
+ readonly verification: "Verification";
6
+ readonly userRole: "UserRole";
7
+ };
8
+ //# sourceMappingURL=model-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-names.d.ts","sourceRoot":"","sources":["../../../src/better-auth/constants/model-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export const BETTER_AUTH_MODELS = {
2
+ user: 'User',
3
+ session: 'Session',
4
+ account: 'Account',
5
+ verification: 'Verification',
6
+ userRole: 'UserRole',
7
+ };
8
+ //# sourceMappingURL=model-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-names.js","sourceRoot":"","sources":["../../../src/better-auth/constants/model-names.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;CACZ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const BETTER_AUTH_PACKAGES: {
2
+ readonly 'better-auth': "1.4.19";
3
+ };
4
+ //# sourceMappingURL=packages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packages.d.ts","sourceRoot":"","sources":["../../../src/better-auth/constants/packages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;CAEvB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export const BETTER_AUTH_PACKAGES = {
2
+ 'better-auth': '1.4.19',
3
+ };
4
+ //# sourceMappingURL=packages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packages.js","sourceRoot":"","sources":["../../../src/better-auth/constants/packages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,aAAa,EAAE,QAAQ;CACf,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/better-auth/core/common.ts"],"names":[],"mappings":"AAUA,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;;;;AAEvE,wBAaG"}
@@ -0,0 +1,17 @@
1
+ import { authModelsSpec, createPluginModule, pluginConfigSpec, } from '@baseplate-dev/project-builder-lib';
2
+ import { BETTER_AUTH_MODELS } from '../constants/model-names.js';
3
+ import { createBetterAuthPluginDefinitionSchema } from './schema/plugin-definition.js';
4
+ export default createPluginModule({
5
+ name: 'common',
6
+ dependencies: {
7
+ pluginConfig: pluginConfigSpec,
8
+ authModels: authModelsSpec,
9
+ },
10
+ initialize: ({ pluginConfig, authModels }, { pluginKey }) => {
11
+ pluginConfig.schemas.set(pluginKey, createBetterAuthPluginDefinitionSchema);
12
+ authModels.getAuthModels.set(() => ({
13
+ user: BETTER_AUTH_MODELS.user,
14
+ }));
15
+ },
16
+ });
17
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/better-auth/core/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,sCAAsC,EAAE,MAAM,+BAA+B,CAAC;AAKvF,eAAe,kBAAkB,CAAC;IAChC,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE;QACZ,YAAY,EAAE,gBAAgB;QAC9B,UAAU,EAAE,cAAc;KAC3B;IACD,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC1D,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,sCAAsC,CAAC,CAAC;QAE5E,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;YAClC,IAAI,EAAE,kBAAkB,CAAC,IAAI;SAC9B,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { WebConfigProps } from '@baseplate-dev/project-builder-lib';
2
+ import type React from 'react';
3
+ import '#src/styles.css';
4
+ export declare function BetterAuthDefinitionEditor({ definition: pluginMetadata, metadata, onSave, }: WebConfigProps): React.JSX.Element;
5
+ //# sourceMappingURL=better-auth-definition-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"better-auth-definition-editor.d.ts","sourceRoot":"","sources":["../../../../src/better-auth/core/components/better-auth-definition-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkC/B,OAAO,iBAAiB,CAAC;AAEzB,wBAAgB,0BAA0B,CAAC,EACzC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACP,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkHpC"}
@@ -1,18 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { createAndApplyModelMergerResults, createModelMergerResults, doesModelMergerResultsHaveChanges, PluginUtils, } from '@baseplate-dev/project-builder-lib';
3
- import { ModelMergerResultAlert, useBlockUnsavedChangesNavigate, useDefinitionSchema, useProjectDefinition, useResettableForm, } from '@baseplate-dev/project-builder-lib/web';
2
+ import { applyMergedDefinition, diffDefinition, PluginUtils, } from '@baseplate-dev/project-builder-lib';
3
+ import { DefinitionDiffAlert, useBlockUnsavedChangesNavigate, useDefinitionSchema, useProjectDefinition, useResettableForm, } from '@baseplate-dev/project-builder-lib/web';
4
4
  import { FormActionBar, SectionList, SectionListSection, SectionListSectionContent, SectionListSectionDescription, SectionListSectionHeader, SectionListSectionTitle, } from '@baseplate-dev/ui-components';
5
5
  import { zodResolver } from '@hookform/resolvers/zod';
6
6
  import { useMemo } from 'react';
7
7
  import { getAuthPluginDefinition } from '#src/auth/utils/get-auth-plugin-definition.js';
8
- import { AUTH0_MODELS } from '#src/auth0/constants/model-names.js';
9
8
  import { AuthConfigTabs } from '#src/common/components/auth-config-tabs.js';
10
- import { createAuth0Models } from '../schema/models.js';
11
- import { createAuth0PluginDefinitionSchema } from '../schema/plugin-definition.js';
9
+ import { createBetterAuthPartialDefinition } from '../schema/models.js';
10
+ import { createBetterAuthPluginDefinitionSchema } from '../schema/plugin-definition.js';
12
11
  import '#src/styles.css';
13
- export function Auth0DefinitionEditor({ definition: pluginMetadata, metadata, onSave, }) {
12
+ export function BetterAuthDefinitionEditor({ definition: pluginMetadata, metadata, onSave, }) {
14
13
  const { definition, definitionContainer, saveDefinitionWithFeedback } = useProjectDefinition();
15
- const auth0PluginDefinitionSchema = useDefinitionSchema(createAuth0PluginDefinitionSchema);
14
+ const betterAuthPluginDefinitionSchema = useDefinitionSchema(createBetterAuthPluginDefinitionSchema);
16
15
  const defaultValues = useMemo(() => {
17
16
  if (pluginMetadata?.config) {
18
17
  return pluginMetadata.config;
@@ -20,23 +19,25 @@ export function Auth0DefinitionEditor({ definition: pluginMetadata, metadata, on
20
19
  return {};
21
20
  }, [pluginMetadata?.config]);
22
21
  const form = useResettableForm({
23
- resolver: zodResolver(auth0PluginDefinitionSchema),
22
+ resolver: zodResolver(betterAuthPluginDefinitionSchema),
24
23
  defaultValues,
25
24
  });
26
25
  const { control, reset, handleSubmit } = form;
27
26
  const authDefinition = getAuthPluginDefinition(definition);
28
- const pendingModelChanges = useMemo(() => {
29
- const desiredModels = createAuth0Models(authDefinition);
30
- return createModelMergerResults(AUTH0_MODELS, desiredModels, definitionContainer);
31
- }, [definitionContainer, authDefinition]);
27
+ const authFeature = definition.features.find((f) => f.id === authDefinition.authFeatureRef);
28
+ if (!authFeature) {
29
+ throw new Error(`Auth feature not found for ref: ${authDefinition.authFeatureRef}`);
30
+ }
31
+ const partialDef = useMemo(() => createBetterAuthPartialDefinition(authFeature.name), [authFeature.name]);
32
+ const diff = useMemo(() => diffDefinition(definitionContainer.schema, definitionContainer.definition, partialDef), [definitionContainer, partialDef]);
32
33
  const onSubmit = handleSubmit((data) => saveDefinitionWithFeedback((draftConfig) => {
33
34
  const updatedData = {
34
35
  ...data,
35
36
  };
36
- createAndApplyModelMergerResults(draftConfig, AUTH0_MODELS, createAuth0Models(authDefinition), definitionContainer);
37
+ applyMergedDefinition(definitionContainer, partialDef)(draftConfig);
37
38
  PluginUtils.setPluginConfig(draftConfig, metadata, updatedData, definitionContainer);
38
39
  }, {
39
- successMessage: 'Successfully saved Auth0 plugin!',
40
+ successMessage: 'Successfully saved Better Auth plugin!',
40
41
  onSuccess: () => {
41
42
  onSave();
42
43
  },
@@ -44,7 +45,6 @@ export function Auth0DefinitionEditor({ definition: pluginMetadata, metadata, on
44
45
  useBlockUnsavedChangesNavigate({ control, reset, onSubmit });
45
46
  return (_jsxs("div", { className: "auth:relative auth:flex auth:h-full auth:flex-1 auth:flex-col auth:gap-4 auth:overflow-hidden", children: [_jsx(AuthConfigTabs, {}), _jsx("div", { className: "auth:mb-[--action-bar-height] auth:flex auth:flex-1 auth:overflow-y-auto", style: {
46
47
  '--action-bar-height': '52px',
47
- }, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsx(SectionList, { children: _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Auth0 Configuration" }), _jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(ModelMergerResultAlert, { pendingModelChanges: pendingModelChanges }) })] }) }) }), _jsx(FormActionBar, { form: form, allowSaveWithoutDirty: !pluginMetadata ||
48
- doesModelMergerResultsHaveChanges(pendingModelChanges) })] }) })] }));
48
+ }, children: _jsxs("form", { onSubmit: onSubmit, className: "auth:max-w-6xl auth:flex-1", children: [_jsx("div", { className: "auth:pb-16", children: _jsx(SectionList, { children: _jsxs(SectionListSection, { children: [_jsxs(SectionListSectionHeader, { children: [_jsx(SectionListSectionTitle, { children: "Better Auth Configuration" }), _jsx(SectionListSectionDescription, { children: "The plugin will automatically configure the models it needs." })] }), _jsx(SectionListSectionContent, { className: "auth:space-y-6", children: _jsx(DefinitionDiffAlert, { diff: diff, upToDateMessage: "All required models are already configured correctly. No changes needed." }) })] }) }) }), _jsx(FormActionBar, { form: form, allowSaveWithoutDirty: !pluginMetadata || diff.hasChanges })] }) })] }));
49
49
  }
50
- //# sourceMappingURL=auth0-definition-editor.js.map
50
+ //# sourceMappingURL=better-auth-definition-editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"better-auth-definition-editor.js","sourceRoot":"","sources":["../../../../src/better-auth/core/components/better-auth-definition-editor.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAI5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,sCAAsC,EAAE,MAAM,gCAAgC,CAAC;AAExF,OAAO,iBAAiB,CAAC;AAEzB,MAAM,UAAU,0BAA0B,CAAC,EACzC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,GACS;IACf,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,GACnE,oBAAoB,EAAE,CAAC;IAEzB,MAAM,gCAAgC,GAAG,mBAAmB,CAC1D,sCAAsC,CACvC,CAAC;IAEF,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,IAAI,cAA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W,CAAC,eAAe,CACzB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,mBAAmB,CACpB,CAAC;IACJ,CAAC,EACD;QACE,cAAc,EAAE,wCAAwC;QACxD,SAAS,EAAE,GAAG,EAAE;YACd,MAAM,EAAE,CAAC;QACX,CAAC;KACF,CACF,CACF,CAAC;IAEF,8BAA8B,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,eAAK,SAAS,EAAC,+FAA+F,aAC5G,KAAC,cAAc,KAAG,EAClB,cACE,SAAS,EAAC,0EAA0E,EACpF,KAAK,EACH;oBACE,qBAAqB,EAAE,MAAM;iBACP,YAG1B,gBAAM,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,4BAA4B,aAC9D,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,WAAW,cACV,MAAC,kBAAkB,eACjB,MAAC,wBAAwB,eACvB,KAAC,uBAAuB,4CAEE,EAC1B,KAAC,6BAA6B,+EAEE,IACP,EAC3B,KAAC,yBAAyB,IAAC,SAAS,EAAC,gBAAgB,YACnD,KAAC,mBAAmB,IAClB,IAAI,EAAE,IAAI,EACV,eAAe,EAAC,0EAA0E,GAC1F,GACwB,IACT,GACT,GACV,EAEN,KAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,qBAAqB,EAAE,CAAC,cAAc,IAAI,IAAI,CAAC,UAAU,GACzD,IACG,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type * from './schema/plugin-definition.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/better-auth/core/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/better-auth/core/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/better-auth/core/node.ts"],"names":[],"mappings":";;;AAkBA,wBAiDG"}
@@ -1,45 +1,47 @@
1
- import { appCompilerSpec, backendAppEntryType, createPluginModule, webAppEntryType, } from '@baseplate-dev/project-builder-lib';
1
+ import { appCompilerSpec, backendAppEntryType, createPluginModule, pluginAppCompiler, webAppEntryType, } from '@baseplate-dev/project-builder-lib';
2
2
  import { reactRoutesGenerator } from '@baseplate-dev/react-generators';
3
3
  import { getAuthPluginDefinition } from '#src/auth/utils/get-auth-plugin-definition.js';
4
- import { auth0ApolloGenerator, auth0HooksGenerator, auth0ModuleGenerator, auth0PagesGenerator, reactAuth0Generator, } from '../generators/index.js';
4
+ import { betterAuthHooksGenerator, betterAuthModuleGenerator, betterAuthPagesGenerator, reactBetterAuthGenerator, } from '../generators/index.js';
5
5
  export default createPluginModule({
6
6
  name: 'node',
7
7
  dependencies: {
8
8
  appCompiler: appCompilerSpec,
9
9
  },
10
10
  initialize: ({ appCompiler }, { pluginKey }) => {
11
- // register backend compiler
12
- appCompiler.compilers.push({
11
+ appCompiler.compilers.push(pluginAppCompiler({
13
12
  pluginKey,
14
13
  appType: backendAppEntryType,
15
- compile: ({ projectDefinition, appCompiler }) => {
14
+ compile: ({ projectDefinition, appDefinition, appCompiler }) => {
16
15
  const auth = getAuthPluginDefinition(projectDefinition);
16
+ // Get web app ports
17
+ const webApps = projectDefinition.apps.filter((app) => app.type === 'web');
18
+ const devWebPorts = webApps.map((app) => app.devPort);
17
19
  appCompiler.addChildrenToFeature(auth.authFeatureRef, {
18
- auth0Module: auth0ModuleGenerator({
19
- includeManagement: true,
20
+ betterAuthModule: betterAuthModuleGenerator({
21
+ devWebPorts,
22
+ devBackendPort: appDefinition.devPort,
20
23
  }),
21
24
  });
22
25
  },
23
- }, {
26
+ }), pluginAppCompiler({
24
27
  pluginKey,
25
28
  appType: webAppEntryType,
26
29
  compile: ({ appCompiler, projectDefinition }) => {
27
30
  const auth = getAuthPluginDefinition(projectDefinition);
28
31
  appCompiler.addRootChildren({
29
- auth: reactAuth0Generator({}),
30
- authHooks: auth0HooksGenerator({
32
+ auth: reactBetterAuthGenerator({}),
33
+ authHooks: betterAuthHooksGenerator({
31
34
  authRoles: auth.roles.map((role) => role.name),
32
35
  }),
33
- auth0Apollo: auth0ApolloGenerator({}),
34
- auth0Callback: reactRoutesGenerator({
36
+ betterAuthPages: reactRoutesGenerator({
35
37
  name: 'auth',
36
38
  children: {
37
- auth: auth0PagesGenerator({}),
39
+ auth: betterAuthPagesGenerator({}),
38
40
  },
39
41
  }),
40
42
  });
41
43
  },
42
- });
44
+ }));
43
45
  },
44
46
  });
45
47
  //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/better-auth/core/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAExF,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,eAAe,kBAAkB,CAAC;IAChC,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE;QACZ,WAAW,EAAE,eAAe;KAC7B;IACD,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7C,WAAW,CAAC,SAAS,CAAC,IAAI,CACxB,iBAAiB,CAAC;YAChB,SAAS;YACT,OAAO,EAAE,mBAAmB;YAC5B,OAAO,EAAE,CAAC,EAAE,iBAAiB,EAAE,aAAa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DefinitionInput } from '@baseplate-dev/project-builder-lib';
2
+ export declare function createBetterAuthPartialDefinition(authFeatureName: string): PartialProjectDefinitionInput;
3
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/better-auth/core/schema/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAIxF,wBAAgB,iCAAiC,CAC/C,eAAe,EAAE,MAAM,GACtB,6BAA6B,CAmR/B"}