payload-auth 1.0.1 → 1.1.0

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 (538) hide show
  1. package/dist/authjs/index.d.ts +1 -0
  2. package/dist/authjs/index.d.ts.map +1 -0
  3. package/dist/authjs/index.js +1 -1
  4. package/dist/better-auth/adapter/generate-schema/generate-schema-builder.d.ts +1 -0
  5. package/dist/better-auth/adapter/generate-schema/generate-schema-builder.d.ts.map +1 -0
  6. package/dist/better-auth/adapter/generate-schema/generate-schema-builder.js +1 -1
  7. package/dist/better-auth/adapter/generate-schema/get-payload-schema.d.ts +1 -0
  8. package/dist/better-auth/adapter/generate-schema/get-payload-schema.d.ts.map +1 -0
  9. package/dist/better-auth/adapter/generate-schema/get-payload-schema.js +1 -1
  10. package/dist/better-auth/adapter/generate-schema/index.d.ts +1 -0
  11. package/dist/better-auth/adapter/generate-schema/index.d.ts.map +1 -0
  12. package/dist/better-auth/adapter/generate-schema/index.js +3 -3
  13. package/dist/better-auth/adapter/generate-schema/utils.d.ts +1 -0
  14. package/dist/better-auth/adapter/generate-schema/utils.d.ts.map +1 -0
  15. package/dist/better-auth/adapter/generate-schema/utils.js +1 -1
  16. package/dist/better-auth/adapter/index.d.ts +3 -2
  17. package/dist/better-auth/adapter/index.d.ts.map +1 -0
  18. package/dist/better-auth/adapter/index.js +115 -69
  19. package/dist/better-auth/adapter/transform/index.d.ts +19 -6
  20. package/dist/better-auth/adapter/transform/index.d.ts.map +1 -0
  21. package/dist/better-auth/adapter/transform/index.js +387 -96
  22. package/dist/better-auth/adapter/types.d.ts +3 -1
  23. package/dist/better-auth/adapter/types.d.ts.map +1 -0
  24. package/dist/better-auth/adapter/types.js +1 -1
  25. package/dist/better-auth/index.d.ts +1 -0
  26. package/dist/better-auth/index.d.ts.map +1 -0
  27. package/dist/better-auth/index.js +1 -1
  28. package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts +3 -0
  29. package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts.map +1 -0
  30. package/dist/better-auth/plugin/helpers/check-passkey-plugin.js +5 -0
  31. package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts +3 -0
  32. package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts.map +1 -0
  33. package/dist/better-auth/plugin/helpers/check-username-plugin.js +5 -0
  34. package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts +1 -0
  35. package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts.map +1 -0
  36. package/dist/better-auth/plugin/helpers/generate-verify-email-url.js +8 -8
  37. package/dist/better-auth/plugin/helpers/get-admin-access.d.ts +8 -0
  38. package/dist/better-auth/plugin/helpers/get-admin-access.d.ts.map +1 -0
  39. package/dist/better-auth/plugin/helpers/get-admin-access.js +22 -0
  40. package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts +14 -0
  41. package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts.map +1 -0
  42. package/dist/better-auth/plugin/helpers/get-admin-routes.js +6 -0
  43. package/dist/better-auth/plugin/helpers/get-all-roles.d.ts +6 -0
  44. package/dist/better-auth/plugin/helpers/get-all-roles.d.ts.map +1 -0
  45. package/dist/better-auth/plugin/helpers/get-all-roles.js +20 -0
  46. package/dist/better-auth/plugin/helpers/get-ip.d.ts +2 -1
  47. package/dist/better-auth/plugin/helpers/get-ip.d.ts.map +1 -0
  48. package/dist/better-auth/plugin/helpers/get-ip.js +14 -14
  49. package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts +3 -0
  50. package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts.map +1 -0
  51. package/dist/better-auth/plugin/helpers/get-requst-collection.js +14 -0
  52. package/dist/better-auth/plugin/helpers/index.d.ts +2 -1
  53. package/dist/better-auth/plugin/helpers/index.d.ts.map +1 -0
  54. package/dist/better-auth/plugin/helpers/index.js +2 -2
  55. package/dist/better-auth/plugin/{lib → helpers}/prepare-session-data.d.ts +3 -2
  56. package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts.map +1 -0
  57. package/dist/better-auth/plugin/helpers/prepare-session-data.js +42 -0
  58. package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts +3 -2
  59. package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts.map +1 -0
  60. package/dist/better-auth/plugin/helpers/serialize-cookie.js +34 -34
  61. package/dist/better-auth/plugin/index.d.ts +8 -7
  62. package/dist/better-auth/plugin/index.d.ts.map +1 -0
  63. package/dist/better-auth/plugin/index.js +145 -37
  64. package/dist/better-auth/plugin/{collections → lib/build-collections}/accounts/hooks/sync-password-to-user.d.ts +2 -1
  65. package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.d.ts.map +1 -0
  66. package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.js +47 -0
  67. package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts +7 -0
  68. package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts.map +1 -0
  69. package/dist/better-auth/plugin/lib/build-collections/accounts/index.js +159 -0
  70. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts +6 -0
  71. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts.map +1 -0
  72. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.js +11 -0
  73. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts +3 -0
  74. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts.map +1 -0
  75. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.js +8 -0
  76. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts +7 -0
  77. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts.map +1 -0
  78. package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.js +107 -0
  79. package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts +6 -0
  80. package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts.map +1 -0
  81. package/dist/better-auth/plugin/lib/build-collections/api-keys.js +196 -0
  82. package/dist/better-auth/plugin/lib/build-collections/index.d.ts +12 -0
  83. package/dist/better-auth/plugin/lib/build-collections/index.d.ts.map +1 -0
  84. package/dist/better-auth/plugin/lib/build-collections/index.js +96 -0
  85. package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts +6 -0
  86. package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts.map +1 -0
  87. package/dist/better-auth/plugin/lib/build-collections/invitations.js +91 -0
  88. package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts +6 -0
  89. package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts.map +1 -0
  90. package/dist/better-auth/plugin/lib/build-collections/jwks.js +43 -0
  91. package/dist/better-auth/plugin/lib/build-collections/members.d.ts +6 -0
  92. package/dist/better-auth/plugin/lib/build-collections/members.d.ts.map +1 -0
  93. package/dist/better-auth/plugin/lib/build-collections/members.js +71 -0
  94. package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts +6 -0
  95. package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts.map +1 -0
  96. package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.js +98 -0
  97. package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts +6 -0
  98. package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts.map +1 -0
  99. package/dist/better-auth/plugin/lib/build-collections/oauth-applications.js +113 -0
  100. package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts +6 -0
  101. package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts.map +1 -0
  102. package/dist/better-auth/plugin/lib/build-collections/oauth-consents.js +67 -0
  103. package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts +6 -0
  104. package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts.map +1 -0
  105. package/dist/better-auth/plugin/lib/build-collections/organizations.js +59 -0
  106. package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts +6 -0
  107. package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts.map +1 -0
  108. package/dist/better-auth/plugin/lib/build-collections/passkeys.js +108 -0
  109. package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts +8 -0
  110. package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts.map +1 -0
  111. package/dist/better-auth/plugin/lib/build-collections/sessions.js +123 -0
  112. package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts +6 -0
  113. package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts.map +1 -0
  114. package/dist/better-auth/plugin/lib/build-collections/sso-providers.js +83 -0
  115. package/dist/better-auth/plugin/lib/build-collections/teams.d.ts +6 -0
  116. package/dist/better-auth/plugin/lib/build-collections/teams.d.ts.map +1 -0
  117. package/dist/better-auth/plugin/lib/build-collections/teams.js +45 -0
  118. package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts +6 -0
  119. package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts.map +1 -0
  120. package/dist/better-auth/plugin/lib/build-collections/two-factors.js +56 -0
  121. package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts +8 -0
  122. package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts.map +1 -0
  123. package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.js +52 -0
  124. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts +3 -0
  125. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts.map +1 -0
  126. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.js +96 -0
  127. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts +13 -0
  128. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts.map +1 -0
  129. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.js +67 -0
  130. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts +4 -0
  131. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts.map +1 -0
  132. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.js +115 -0
  133. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts +3 -0
  134. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts.map +1 -0
  135. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.js +110 -0
  136. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts +3 -0
  137. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts.map +1 -0
  138. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.js +62 -0
  139. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts +3 -0
  140. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts.map +1 -0
  141. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.js +42 -0
  142. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts +4 -0
  143. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts.map +1 -0
  144. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.js +79 -0
  145. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts +4 -0
  146. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts.map +1 -0
  147. package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.js +153 -0
  148. package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/after-login.d.ts +2 -1
  149. package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.d.ts.map +1 -0
  150. package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.js +75 -0
  151. package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/after-logout.d.ts +2 -1
  152. package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.d.ts.map +1 -0
  153. package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.js +74 -0
  154. package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts +7 -0
  155. package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts.map +1 -0
  156. package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.js +45 -0
  157. package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/before-login.d.ts +2 -1
  158. package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.d.ts.map +1 -0
  159. package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.js +18 -0
  160. package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts +3 -0
  161. package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts.map +1 -0
  162. package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.js +14 -0
  163. package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/sync-account.d.ts +2 -1
  164. package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.d.ts.map +1 -0
  165. package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.js +82 -0
  166. package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts +8 -0
  167. package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts.map +1 -0
  168. package/dist/better-auth/plugin/lib/build-collections/users/index.js +345 -0
  169. package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts +8 -0
  170. package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts.map +1 -0
  171. package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.js +31 -0
  172. package/dist/better-auth/plugin/lib/{payload-access.d.ts → build-collections/utils/payload-access.d.ts} +2 -1
  173. package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.d.ts.map +1 -0
  174. package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.js +64 -0
  175. package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts +7 -0
  176. package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts.map +1 -0
  177. package/dist/better-auth/plugin/lib/build-collections/verifications.js +63 -0
  178. package/dist/better-auth/plugin/lib/{config.d.ts → constants.d.ts} +14 -0
  179. package/dist/better-auth/plugin/lib/constants.d.ts.map +1 -0
  180. package/dist/better-auth/plugin/lib/constants.js +56 -0
  181. package/dist/better-auth/plugin/lib/get-payload-auth.d.ts +3 -2
  182. package/dist/better-auth/plugin/lib/get-payload-auth.d.ts.map +1 -0
  183. package/dist/better-auth/plugin/lib/get-payload-auth.js +2 -2
  184. package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts +5 -4
  185. package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts.map +1 -0
  186. package/dist/better-auth/plugin/lib/get-required-collection-slugs.js +26 -43
  187. package/dist/better-auth/plugin/lib/init-better-auth.d.ts +5 -3
  188. package/dist/better-auth/plugin/lib/init-better-auth.d.ts.map +1 -0
  189. package/dist/better-auth/plugin/lib/init-better-auth.js +6 -6
  190. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts +3 -0
  191. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts.map +1 -0
  192. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.js +8 -0
  193. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts +2 -0
  194. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts.map +1 -0
  195. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.js +17 -0
  196. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts +10 -0
  197. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts.map +1 -0
  198. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.js +118 -0
  199. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts +2 -0
  200. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts.map +1 -0
  201. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.js +58 -0
  202. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts +2 -0
  203. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts.map +1 -0
  204. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.js +86 -0
  205. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts +2 -0
  206. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts.map +1 -0
  207. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.js +17 -0
  208. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts +2 -0
  209. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts.map +1 -0
  210. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.js +17 -0
  211. package/dist/better-auth/plugin/lib/{ensure-password-set-before-create.d.ts → sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts} +2 -1
  212. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts.map +1 -0
  213. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.js +23 -0
  214. package/dist/better-auth/plugin/lib/{password.d.ts → sanitize-better-auth-options/utils/password.d.ts} +1 -0
  215. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.d.ts.map +1 -0
  216. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.js +62 -0
  217. package/dist/better-auth/plugin/lib/{respect-save-to-jwt-fields-middleware.d.ts → sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts} +6 -5
  218. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts.map +1 -0
  219. package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.js +30 -0
  220. package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts +8 -0
  221. package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts.map +1 -0
  222. package/dist/better-auth/plugin/payload/components/admin-buttons/index.js +115 -0
  223. package/dist/better-auth/plugin/payload/components/admin-buttons/index.scss +31 -0
  224. package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts +11 -0
  225. package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts.map +1 -0
  226. package/dist/better-auth/plugin/payload/components/admin-invite-button/index.js +196 -0
  227. package/dist/better-auth/plugin/payload/components/admin-invite-button/index.scss +131 -0
  228. package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts +14 -0
  229. package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts.map +1 -0
  230. package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.js +111 -0
  231. package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.scss +51 -0
  232. package/dist/better-auth/plugin/payload/components/form-header/index.d.ts +9 -0
  233. package/dist/better-auth/plugin/payload/components/form-header/index.d.ts.map +1 -0
  234. package/dist/better-auth/plugin/payload/components/form-header/index.js +23 -0
  235. package/dist/better-auth/plugin/payload/components/form-header/index.scss +8 -0
  236. package/dist/better-auth/plugin/payload/components/icons.d.ts +9 -0
  237. package/dist/better-auth/plugin/payload/components/icons.d.ts.map +1 -0
  238. package/dist/better-auth/plugin/payload/components/icons.js +437 -0
  239. package/dist/better-auth/plugin/payload/components/logo.d.ts +4 -1
  240. package/dist/better-auth/plugin/payload/components/logo.d.ts.map +1 -0
  241. package/dist/better-auth/plugin/payload/components/logo.js +22 -34
  242. package/dist/better-auth/plugin/payload/components/logout-button.d.ts +6 -0
  243. package/dist/better-auth/plugin/payload/components/logout-button.d.ts.map +1 -0
  244. package/dist/better-auth/plugin/payload/components/logout-button.js +27 -0
  245. package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts +7 -0
  246. package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts.map +1 -0
  247. package/dist/better-auth/plugin/payload/components/rsc-redirect.js +8 -0
  248. package/dist/better-auth/plugin/payload/components/styles.css +2 -2
  249. package/dist/better-auth/plugin/payload/components/token-field.d.ts +5 -0
  250. package/dist/better-auth/plugin/payload/components/token-field.d.ts.map +1 -0
  251. package/dist/better-auth/plugin/payload/components/token-field.js +30 -0
  252. package/dist/better-auth/plugin/payload/exports/client.d.ts +7 -3
  253. package/dist/better-auth/plugin/payload/exports/client.d.ts.map +1 -0
  254. package/dist/better-auth/plugin/payload/exports/client.js +7 -4
  255. package/dist/better-auth/plugin/payload/exports/rsc.d.ts +10 -5
  256. package/dist/better-auth/plugin/payload/exports/rsc.d.ts.map +1 -0
  257. package/dist/better-auth/plugin/payload/exports/rsc.js +10 -6
  258. package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts +3 -0
  259. package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts.map +1 -0
  260. package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.js +8 -0
  261. package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts +15 -0
  262. package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts.map +1 -0
  263. package/dist/better-auth/plugin/payload/utils/generate-metadata.js +74 -0
  264. package/dist/better-auth/plugin/payload/utils/get-safe-redirect.d.ts +2 -0
  265. package/dist/better-auth/plugin/payload/utils/get-safe-redirect.d.ts.map +1 -0
  266. package/dist/better-auth/plugin/payload/utils/get-safe-redirect.js +23 -0
  267. package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts +12 -0
  268. package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts.map +1 -0
  269. package/dist/better-auth/plugin/payload/views/admin-invite/client.js +92 -0
  270. package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts +11 -0
  271. package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts.map +1 -0
  272. package/dist/better-auth/plugin/payload/views/admin-invite/index.js +84 -0
  273. package/dist/better-auth/plugin/payload/views/admin-invite/index.scss +25 -0
  274. package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts +14 -0
  275. package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts.map +1 -0
  276. package/dist/better-auth/plugin/payload/views/create-first-admin/client.js +95 -0
  277. package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts +11 -3
  278. package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts.map +1 -0
  279. package/dist/better-auth/plugin/payload/views/create-first-admin/index.js +124 -92
  280. package/dist/better-auth/plugin/payload/views/create-first-admin/index.scss +29 -0
  281. package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts +8 -0
  282. package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts.map +1 -0
  283. package/dist/better-auth/plugin/payload/views/forgot-password/client.js +119 -0
  284. package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts +9 -0
  285. package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts.map +1 -0
  286. package/dist/better-auth/plugin/payload/views/forgot-password/index.js +69 -0
  287. package/dist/better-auth/plugin/payload/views/forgot-password/index.scss +0 -0
  288. package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts +5 -0
  289. package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts.map +1 -0
  290. package/dist/better-auth/plugin/payload/views/inactivity/index.js +12 -0
  291. package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts +9 -0
  292. package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts.map +1 -0
  293. package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.js +54 -0
  294. package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts +1 -0
  295. package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts.map +1 -0
  296. package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.js +121 -0
  297. package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.scss +31 -0
  298. package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts +56 -0
  299. package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts.map +1 -0
  300. package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.js +3 -0
  301. package/dist/better-auth/plugin/payload/views/login/form/index.d.ts +17 -0
  302. package/dist/better-auth/plugin/payload/views/login/form/index.d.ts.map +1 -0
  303. package/dist/better-auth/plugin/payload/views/login/form/index.js +137 -0
  304. package/dist/better-auth/plugin/payload/views/login/form/index.scss +23 -0
  305. package/dist/better-auth/plugin/payload/views/login/index.d.ts +11 -4
  306. package/dist/better-auth/plugin/payload/views/login/index.d.ts.map +1 -0
  307. package/dist/better-auth/plugin/payload/views/login/index.js +81 -61
  308. package/dist/better-auth/plugin/payload/views/login/index.scss +10 -0
  309. package/dist/better-auth/plugin/payload/views/logout/client.d.ts +8 -0
  310. package/dist/better-auth/plugin/payload/views/logout/client.d.ts.map +1 -0
  311. package/dist/better-auth/plugin/payload/views/logout/client.js +76 -0
  312. package/dist/better-auth/plugin/payload/views/logout/index.d.ts +8 -0
  313. package/dist/better-auth/plugin/payload/views/logout/index.d.ts.map +1 -0
  314. package/dist/better-auth/plugin/payload/views/logout/index.js +14 -0
  315. package/dist/better-auth/plugin/payload/views/logout/index.scss +0 -0
  316. package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts +7 -0
  317. package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts.map +1 -0
  318. package/dist/better-auth/plugin/payload/views/reset-password/client.js +72 -0
  319. package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts +5 -0
  320. package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts.map +1 -0
  321. package/dist/better-auth/plugin/payload/views/reset-password/index.js +81 -0
  322. package/dist/better-auth/plugin/payload/views/reset-password/index.scss +9 -0
  323. package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts +3 -0
  324. package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts.map +1 -0
  325. package/dist/better-auth/plugin/payload/views/reset-password/metadata.js +11 -0
  326. package/dist/better-auth/plugin/types.d.ts +171 -33
  327. package/dist/better-auth/plugin/types.d.ts.map +1 -0
  328. package/dist/better-auth/plugin/types.js +1 -1
  329. package/dist/better-auth/types.d.ts +1 -0
  330. package/dist/better-auth/types.d.ts.map +1 -0
  331. package/dist/better-auth/types.js +1 -1
  332. package/dist/clerk/admin-ui.d.ts +4 -0
  333. package/dist/clerk/admin-ui.d.ts.map +1 -0
  334. package/dist/clerk/admin-ui.js +5 -0
  335. package/dist/clerk/index.d.ts +7 -1
  336. package/dist/clerk/index.d.ts.map +1 -0
  337. package/dist/clerk/index.js +7 -2
  338. package/dist/clerk/plugin/auth-strategy.d.ts +11 -0
  339. package/dist/clerk/plugin/auth-strategy.d.ts.map +1 -0
  340. package/dist/clerk/plugin/auth-strategy.js +45 -0
  341. package/dist/clerk/plugin/collections/users/access.d.ts +14 -0
  342. package/dist/clerk/plugin/collections/users/access.d.ts.map +1 -0
  343. package/dist/clerk/plugin/collections/users/access.js +36 -0
  344. package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.d.ts +14 -0
  345. package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.d.ts.map +1 -0
  346. package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.js +108 -0
  347. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/index.d.ts +4 -0
  348. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/index.d.ts.map +1 -0
  349. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/index.js +5 -0
  350. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.d.ts +13 -0
  351. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.d.ts.map +1 -0
  352. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.js +33 -0
  353. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.d.ts +11 -0
  354. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.d.ts.map +1 -0
  355. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.js +27 -0
  356. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.d.ts +13 -0
  357. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.d.ts.map +1 -0
  358. package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.js +35 -0
  359. package/dist/clerk/plugin/collections/users/endpoints/webhook/index.d.ts +12 -0
  360. package/dist/clerk/plugin/collections/users/endpoints/webhook/index.d.ts.map +1 -0
  361. package/dist/clerk/plugin/collections/users/endpoints/webhook/index.js +86 -0
  362. package/dist/clerk/plugin/collections/users/fields.d.ts +6 -0
  363. package/dist/clerk/plugin/collections/users/fields.d.ts.map +1 -0
  364. package/dist/clerk/plugin/collections/users/fields.js +81 -0
  365. package/dist/clerk/plugin/collections/users/index.d.ts +10 -0
  366. package/dist/clerk/plugin/collections/users/index.d.ts.map +1 -0
  367. package/dist/clerk/plugin/collections/users/index.js +95 -0
  368. package/dist/clerk/plugin/components/after-login-form.d.ts +4 -0
  369. package/dist/clerk/plugin/components/after-login-form.d.ts.map +1 -0
  370. package/dist/clerk/plugin/components/after-login-form.js +65 -0
  371. package/dist/clerk/plugin/components/logout-button.d.ts +2 -0
  372. package/dist/clerk/plugin/components/logout-button.d.ts.map +1 -0
  373. package/dist/clerk/plugin/components/logout-button.js +49 -0
  374. package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts +6 -0
  375. package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts.map +1 -0
  376. package/dist/clerk/plugin/components/sync-clerk-users-button.js +75 -0
  377. package/dist/clerk/plugin.d.ts +6 -0
  378. package/dist/clerk/plugin.d.ts.map +1 -0
  379. package/dist/clerk/plugin.js +63 -0
  380. package/dist/clerk/types.d.ts +63 -0
  381. package/dist/clerk/types.d.ts.map +1 -0
  382. package/dist/clerk/types.js +3 -0
  383. package/dist/clerk/utils/clerk-user.d.ts +21 -0
  384. package/dist/clerk/utils/clerk-user.d.ts.map +1 -0
  385. package/dist/clerk/utils/clerk-user.js +45 -0
  386. package/dist/clerk/utils/index.d.ts +4 -0
  387. package/dist/clerk/utils/index.d.ts.map +1 -0
  388. package/dist/clerk/utils/index.js +5 -0
  389. package/dist/clerk/utils/load-clerk-instance.d.ts +8 -0
  390. package/dist/clerk/utils/load-clerk-instance.d.ts.map +1 -0
  391. package/dist/clerk/utils/load-clerk-instance.js +11 -0
  392. package/dist/clerk/utils/svix.d.ts +9 -0
  393. package/dist/clerk/utils/svix.d.ts.map +1 -0
  394. package/dist/clerk/utils/svix.js +40 -0
  395. package/dist/clerk/utils/user.d.ts +17 -0
  396. package/dist/clerk/utils/user.d.ts.map +1 -0
  397. package/dist/clerk/utils/user.js +46 -0
  398. package/dist/index.d.ts +5 -0
  399. package/dist/index.d.ts.map +1 -0
  400. package/dist/index.js +5 -5
  401. package/dist/kinde/index.d.ts +1 -0
  402. package/dist/kinde/index.d.ts.map +1 -0
  403. package/dist/kinde/index.js +1 -1
  404. package/package.json +44 -18
  405. package/LICENSE.md +0 -17
  406. package/dist/authjs/index.js.map +0 -1
  407. package/dist/better-auth/adapter/dev/bin/run.d.ts +0 -1
  408. package/dist/better-auth/adapter/dev/bin/run.js +0 -64
  409. package/dist/better-auth/adapter/dev/bin/run.js.map +0 -1
  410. package/dist/better-auth/adapter/dev/bin/schema.d.ts +0 -22
  411. package/dist/better-auth/adapter/dev/bin/schema.js +0 -160
  412. package/dist/better-auth/adapter/dev/bin/schema.js.map +0 -1
  413. package/dist/better-auth/adapter/dev/collections.d.ts +0 -3
  414. package/dist/better-auth/adapter/dev/collections.js +0 -212
  415. package/dist/better-auth/adapter/dev/collections.js.map +0 -1
  416. package/dist/better-auth/adapter/dev/index.d.ts +0 -3
  417. package/dist/better-auth/adapter/dev/index.js +0 -168
  418. package/dist/better-auth/adapter/dev/index.js.map +0 -1
  419. package/dist/better-auth/adapter/generate-schema/generate-schema-builder.js.map +0 -1
  420. package/dist/better-auth/adapter/generate-schema/get-payload-schema.js.map +0 -1
  421. package/dist/better-auth/adapter/generate-schema/index.js.map +0 -1
  422. package/dist/better-auth/adapter/generate-schema/utils.js.map +0 -1
  423. package/dist/better-auth/adapter/index.js.map +0 -1
  424. package/dist/better-auth/adapter/test/adapter.test.d.ts +0 -1
  425. package/dist/better-auth/adapter/test/adapter.test.js +0 -181
  426. package/dist/better-auth/adapter/test/adapter.test.js.map +0 -1
  427. package/dist/better-auth/adapter/test/better-auth-adapter-test.d.ts +0 -7
  428. package/dist/better-auth/adapter/test/better-auth-adapter-test.js +0 -425
  429. package/dist/better-auth/adapter/test/better-auth-adapter-test.js.map +0 -1
  430. package/dist/better-auth/adapter/test/schema.test.d.ts +0 -1
  431. package/dist/better-auth/adapter/test/schema.test.js +0 -796
  432. package/dist/better-auth/adapter/test/schema.test.js.map +0 -1
  433. package/dist/better-auth/adapter/test/test_payload1/schema.d.ts +0 -23
  434. package/dist/better-auth/adapter/test/test_payload1/schema.js +0 -177
  435. package/dist/better-auth/adapter/test/test_payload1/schema.js.map +0 -1
  436. package/dist/better-auth/adapter/test/test_payload2/schema.d.ts +0 -23
  437. package/dist/better-auth/adapter/test/test_payload2/schema.js +0 -167
  438. package/dist/better-auth/adapter/test/test_payload2/schema.js.map +0 -1
  439. package/dist/better-auth/adapter/test/test_payload3/schema.d.ts +0 -23
  440. package/dist/better-auth/adapter/test/test_payload3/schema.js +0 -198
  441. package/dist/better-auth/adapter/test/test_payload3/schema.js.map +0 -1
  442. package/dist/better-auth/adapter/transform/index.js.map +0 -1
  443. package/dist/better-auth/adapter/types.js.map +0 -1
  444. package/dist/better-auth/index.js.map +0 -1
  445. package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.js +0 -47
  446. package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.js.map +0 -1
  447. package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.d.ts +0 -6
  448. package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.js +0 -106
  449. package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.js.map +0 -1
  450. package/dist/better-auth/plugin/collections/users/hooks/after-login.js +0 -71
  451. package/dist/better-auth/plugin/collections/users/hooks/after-login.js.map +0 -1
  452. package/dist/better-auth/plugin/collections/users/hooks/after-logout.js +0 -49
  453. package/dist/better-auth/plugin/collections/users/hooks/after-logout.js.map +0 -1
  454. package/dist/better-auth/plugin/collections/users/hooks/before-login.js +0 -18
  455. package/dist/better-auth/plugin/collections/users/hooks/before-login.js.map +0 -1
  456. package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.d.ts +0 -5
  457. package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.js +0 -33
  458. package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.js.map +0 -1
  459. package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.d.ts +0 -2
  460. package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.js +0 -14
  461. package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.js.map +0 -1
  462. package/dist/better-auth/plugin/collections/users/hooks/sync-account.js +0 -82
  463. package/dist/better-auth/plugin/collections/users/hooks/sync-account.js.map +0 -1
  464. package/dist/better-auth/plugin/helpers/generate-verify-email-url.js.map +0 -1
  465. package/dist/better-auth/plugin/helpers/get-ip.js.map +0 -1
  466. package/dist/better-auth/plugin/helpers/index.js.map +0 -1
  467. package/dist/better-auth/plugin/helpers/serialize-cookie.js.map +0 -1
  468. package/dist/better-auth/plugin/index.js.map +0 -1
  469. package/dist/better-auth/plugin/lib/auth-strategy.d.ts +0 -8
  470. package/dist/better-auth/plugin/lib/auth-strategy.js +0 -48
  471. package/dist/better-auth/plugin/lib/auth-strategy.js.map +0 -1
  472. package/dist/better-auth/plugin/lib/build-collection-configs.d.ts +0 -11
  473. package/dist/better-auth/plugin/lib/build-collection-configs.js +0 -1558
  474. package/dist/better-auth/plugin/lib/build-collection-configs.js.map +0 -1
  475. package/dist/better-auth/plugin/lib/config.js +0 -43
  476. package/dist/better-auth/plugin/lib/config.js.map +0 -1
  477. package/dist/better-auth/plugin/lib/ensure-password-set-before-create.js +0 -24
  478. package/dist/better-auth/plugin/lib/ensure-password-set-before-create.js.map +0 -1
  479. package/dist/better-auth/plugin/lib/get-payload-auth.js.map +0 -1
  480. package/dist/better-auth/plugin/lib/get-required-collection-slugs.js.map +0 -1
  481. package/dist/better-auth/plugin/lib/init-better-auth.js.map +0 -1
  482. package/dist/better-auth/plugin/lib/password.js +0 -63
  483. package/dist/better-auth/plugin/lib/password.js.map +0 -1
  484. package/dist/better-auth/plugin/lib/payload-access.js +0 -64
  485. package/dist/better-auth/plugin/lib/payload-access.js.map +0 -1
  486. package/dist/better-auth/plugin/lib/prepare-session-data.js +0 -42
  487. package/dist/better-auth/plugin/lib/prepare-session-data.js.map +0 -1
  488. package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.js +0 -30
  489. package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.js.map +0 -1
  490. package/dist/better-auth/plugin/lib/sanitize-auth-options.d.ts +0 -5
  491. package/dist/better-auth/plugin/lib/sanitize-auth-options.js +0 -298
  492. package/dist/better-auth/plugin/lib/sanitize-auth-options.js.map +0 -1
  493. package/dist/better-auth/plugin/payload/components/admin-buttons.d.ts +0 -5
  494. package/dist/better-auth/plugin/payload/components/admin-buttons.js +0 -222
  495. package/dist/better-auth/plugin/payload/components/admin-buttons.js.map +0 -1
  496. package/dist/better-auth/plugin/payload/components/login-redirect.d.ts +0 -1
  497. package/dist/better-auth/plugin/payload/components/login-redirect.js +0 -6
  498. package/dist/better-auth/plugin/payload/components/login-redirect.js.map +0 -1
  499. package/dist/better-auth/plugin/payload/components/logo.js.map +0 -1
  500. package/dist/better-auth/plugin/payload/components/logout.d.ts +0 -1
  501. package/dist/better-auth/plugin/payload/components/logout.js +0 -61
  502. package/dist/better-auth/plugin/payload/components/logout.js.map +0 -1
  503. package/dist/better-auth/plugin/payload/components/sign-in.d.ts +0 -3
  504. package/dist/better-auth/plugin/payload/components/sign-in.js +0 -384
  505. package/dist/better-auth/plugin/payload/components/sign-in.js.map +0 -1
  506. package/dist/better-auth/plugin/payload/components/sign-up.d.ts +0 -6
  507. package/dist/better-auth/plugin/payload/components/sign-up.js +0 -502
  508. package/dist/better-auth/plugin/payload/components/sign-up.js.map +0 -1
  509. package/dist/better-auth/plugin/payload/components/ui/button.d.ts +0 -10
  510. package/dist/better-auth/plugin/payload/components/ui/button.js +0 -42
  511. package/dist/better-auth/plugin/payload/components/ui/button.js.map +0 -1
  512. package/dist/better-auth/plugin/payload/components/ui/card.d.ts +0 -9
  513. package/dist/better-auth/plugin/payload/components/ui/card.js +0 -55
  514. package/dist/better-auth/plugin/payload/components/ui/card.js.map +0 -1
  515. package/dist/better-auth/plugin/payload/components/ui/checkbox.d.ts +0 -4
  516. package/dist/better-auth/plugin/payload/components/ui/checkbox.js +0 -23
  517. package/dist/better-auth/plugin/payload/components/ui/checkbox.js.map +0 -1
  518. package/dist/better-auth/plugin/payload/components/ui/cn.d.ts +0 -2
  519. package/dist/better-auth/plugin/payload/components/ui/cn.js +0 -7
  520. package/dist/better-auth/plugin/payload/components/ui/cn.js.map +0 -1
  521. package/dist/better-auth/plugin/payload/components/ui/input.d.ts +0 -3
  522. package/dist/better-auth/plugin/payload/components/ui/input.js +0 -14
  523. package/dist/better-auth/plugin/payload/components/ui/input.js.map +0 -1
  524. package/dist/better-auth/plugin/payload/components/ui/label.d.ts +0 -4
  525. package/dist/better-auth/plugin/payload/components/ui/label.js +0 -15
  526. package/dist/better-auth/plugin/payload/components/ui/label.js.map +0 -1
  527. package/dist/better-auth/plugin/payload/components/ui/password-input.d.ts +0 -2
  528. package/dist/better-auth/plugin/payload/components/ui/password-input.js +0 -55
  529. package/dist/better-auth/plugin/payload/components/ui/password-input.js.map +0 -1
  530. package/dist/better-auth/plugin/payload/exports/client.js.map +0 -1
  531. package/dist/better-auth/plugin/payload/exports/rsc.js.map +0 -1
  532. package/dist/better-auth/plugin/payload/views/create-first-admin/index.js.map +0 -1
  533. package/dist/better-auth/plugin/payload/views/login/index.js.map +0 -1
  534. package/dist/better-auth/plugin/types.js.map +0 -1
  535. package/dist/better-auth/types.js.map +0 -1
  536. package/dist/clerk/index.js.map +0 -1
  537. package/dist/index.js.map +0 -1
  538. package/dist/kinde/index.js.map +0 -1
@@ -1,6 +1,7 @@
1
- import type { UnionToIntersection, betterAuth } from 'better-auth';
2
- import type { BetterAuthOptions, BetterAuthPlugin, InferAPI, InferPluginTypes } from 'better-auth/types';
3
- import type { BasePayload, CollectionConfig, Config, Endpoint, PayloadRequest } from 'payload';
1
+ import type { UnionToIntersection, betterAuth } from "better-auth";
2
+ import type { BetterAuthOptions as BetterAuthOptionsType, BetterAuthPlugin as BetterAuthPluginType, InferAPI, InferPluginTypes } from "better-auth/types";
3
+ import type { BasePayload, CollectionConfig, Config, Endpoint, Payload, PayloadRequest } from "payload";
4
+ import { adminRoutes } from "./lib/constants";
4
5
  /**
5
6
  * BetterAuth options with the following caveats:
6
7
  * - The `database` option is removed as it is configured internally
@@ -11,36 +12,83 @@ import type { BasePayload, CollectionConfig, Config, Endpoint, PayloadRequest }
11
12
  *
12
13
  * @see https://www.better-auth.com/docs/reference/options
13
14
  */
14
- export interface PayloadBetterAuthOptions extends Omit<BetterAuthOptions, 'database' | 'user' | 'account' | 'verification' | 'session' | 'advanced'> {
15
- user?: Omit<NonNullable<BetterAuthOptions['user']>, 'modelName' | 'fields'> | undefined;
16
- account?: Omit<NonNullable<BetterAuthOptions['account']>, 'modelName' | 'fields'> | undefined;
17
- session?: Omit<NonNullable<BetterAuthOptions['session']>, 'modelName' | 'fields'> | undefined;
18
- verification?: Omit<NonNullable<BetterAuthOptions['verification']>, 'modelName' | 'fields'> | undefined;
19
- advanced?: Omit<NonNullable<BetterAuthOptions['advanced']>, 'generateId'> | undefined;
15
+ export interface BetterAuthOptions extends Omit<BetterAuthOptionsType, "database" | "user" | "account" | "verification" | "session" | "advanced"> {
16
+ user?: Omit<NonNullable<BetterAuthOptionsType["user"]>, "modelName" | "fields"> | undefined;
17
+ account?: Omit<NonNullable<BetterAuthOptionsType["account"]>, "modelName" | "fields"> | undefined;
18
+ session?: Omit<NonNullable<BetterAuthOptionsType["session"]>, "modelName" | "fields"> | undefined;
19
+ verification?: Omit<NonNullable<BetterAuthOptionsType["verification"]>, "modelName" | "fields"> | undefined;
20
+ advanced?: Omit<NonNullable<BetterAuthOptionsType["advanced"]>, "generateId"> | undefined;
20
21
  }
21
- export interface SanitizedBetterAuthOptions extends Omit<BetterAuthOptions, 'database'> {
22
+ export interface SanitizedBetterAuthOptions extends Omit<BetterAuthOptionsType, "database"> {
22
23
  }
23
- export interface PayloadBetterAuthPluginOptions {
24
+ export type SocialProvider = keyof NonNullable<BetterAuthOptionsType["socialProviders"]>;
25
+ export type SocialProviders = {
26
+ [key in SocialProvider]?: {
27
+ enabled?: boolean;
28
+ disableSignUp?: boolean;
29
+ };
30
+ };
31
+ export interface BetterAuthPluginOptions {
24
32
  /**
25
33
  * Disable the plugin
26
34
  * @default false
27
35
  */
28
36
  disabled?: boolean;
29
37
  /**
30
- * Enable debug logs
38
+ * Disable the default payload auth
39
+ *
40
+ * This will ensure that better-auth handles both admin and frontend auth
41
+ *
42
+ * Admin will make use of custom admin routes for auth and give you more control
43
+ *
44
+ * Note: This will override the option passed in the users collection config
45
+ *
46
+ * Read about this more in the docs
47
+ * @see https://www.payloadauth.com/docs/better-auth#disable-default-payload-auth
48
+ *
31
49
  * @default false
32
50
  */
33
- enableDebugLogs?: boolean;
51
+ disableDefaultPayloadAuth?: boolean;
34
52
  /**
35
- * Log the tables that are needed for better-auth on init
36
- * @default false
53
+ * Custom admin components when disableDefaultPayloadAuth is true
54
+ *
55
+ * These components will be used to render the login, create first admin, and other auth-related views
37
56
  */
38
- logTables?: boolean;
57
+ adminComponents?: {
58
+ /**
59
+ * Custom social providers
60
+ *
61
+ * This will add social providers to the login view
62
+ *
63
+ * Make sure to include the provider in the betterAuthOptions.socialProviders array
64
+ */
65
+ socialProviders?: SocialProviders;
66
+ };
39
67
  /**
40
- * Hide the plugin collections from the payload admin UI
68
+ * Debug options
69
+ */
70
+ debug?: {
71
+ /**
72
+ * Enable debug logs
73
+ * @default false
74
+ */
75
+ enableDebugLogs?: boolean;
76
+ /**
77
+ * Log the tables that are needed for better-auth on init
78
+ * @default false
79
+ */
80
+ logTables?: boolean;
81
+ };
82
+ /**
83
+ * Hide the better-authplugin collections from the payload admin UI
41
84
  * @default false
42
85
  */
43
86
  hidePluginCollections?: boolean;
87
+ /**
88
+ * Defines the admin group for collections.
89
+ * @default "Auth"
90
+ */
91
+ collectionAdminGroup?: string;
44
92
  /**
45
93
  * Configure the Users collections:
46
94
  */
@@ -54,23 +102,57 @@ export interface PayloadBetterAuthPluginOptions {
54
102
  */
55
103
  slug?: string | undefined;
56
104
  /**
57
- * Define better-auth admin plugin access control
105
+ * The default role for users
58
106
  *
59
- * This will also set the role which gives the user access to the payload admin UI
60
- * @see https://www.better-auth.com/docs/plugins/admin#access-control
107
+ * This will be used as the default role for the role field in the users collection
61
108
  *
62
- * @default ["admin"]
109
+ * If you define this you must also have this role in the roles array
110
+ *
111
+ * This will also be used as the defaultRole option in the better-auth admin plugin if present
112
+ * @see https://www.better-auth.com/docs/plugins/admin#default-role
113
+ * @default "user"
63
114
  */
64
- adminRoles?: string[];
115
+ defaultRole?: string;
65
116
  /**
66
- * Define roles for the users collection
117
+ * The default role for admins
118
+ *
119
+ * This will be used as the default role for when admins sign up in the create first admin view or when inviting new admins
120
+ *
121
+ *
122
+ * @default "admin"
123
+ */
124
+ defaultAdminRole?: string;
125
+ /**
126
+ * All roles for the users collection
127
+ *
128
+ * These will be used to define all the options in the user collection role field
129
+ *
130
+ * Will be merged with the adminRoles array, no need to worry about redefining in adminRoles or duplicates
67
131
  *
68
132
  * This should match the roles in the better-auth admin plugin if you are using it
69
133
  * @see https://www.better-auth.com/docs/plugins/admin#access-control
134
+ *
135
+ * @default ["user"]
70
136
  */
71
137
  roles?: string[];
138
+ /**
139
+ * Define admin roles for the users collection
140
+ *
141
+ * These roles will be given admin access to all auth collections created by this plugin
142
+ *
143
+ * Note: Will be merged with the roles array, no need to worry about redefining in roles or duplicates
144
+ *
145
+ * Will be also used as the adminRoles option in the better-auth admin plugin if present
146
+ *
147
+ * @see https://www.better-auth.com/docs/plugins/admin#admin-roles
148
+ *
149
+ * @default ["admin"]
150
+ */
151
+ adminRoles?: string[];
72
152
  /**
73
153
  * Hide the `users` collection from the payload admin UI
154
+ *
155
+ * This will be overwritten if you change the value in the collection overrides option
74
156
  */
75
157
  hidden?: boolean | undefined;
76
158
  /**
@@ -175,6 +257,50 @@ export interface PayloadBetterAuthPluginOptions {
175
257
  * Hide the `verifications` collection from the payload admin UI
176
258
  */
177
259
  hidden?: boolean | undefined;
260
+ /**
261
+ * Function to override the collection configuration
262
+ *
263
+ * This allows modifying the collection config after it has been built
264
+ *
265
+ * @param options Object containing the collection config and potentially additional parameters
266
+ * @returns Modified collection config
267
+ */
268
+ collectionOverrides?: (options: {
269
+ collection: CollectionConfig;
270
+ }) => CollectionConfig;
271
+ };
272
+ /**
273
+ * Configure the Admin Invitations collections:
274
+ */
275
+ adminInvitations?: {
276
+ /**
277
+ * Will set the `slug` for the `admin-invitations` collection in payload
278
+ *
279
+ * @default 'admin-invitations'
280
+ */
281
+ slug?: string | undefined;
282
+ /**
283
+ * Hide the `admin-invitations` collection from the payload admin UI
284
+ */
285
+ hidden?: boolean | undefined;
286
+ /**
287
+ * This will be used to generate the admin invite url
288
+ *
289
+ * @param options Object containing payload and the token
290
+ * @returns The admin invite url
291
+ */
292
+ generateInviteUrl?: GenerateAdminInviteUrlFn;
293
+ /**
294
+ * Function to override the collection configuration
295
+ *
296
+ * This allows modifying the collection config after it has been built
297
+ *
298
+ * @param options Object containing the collection config and potentially additional parameters
299
+ * @returns Modified collection config
300
+ */
301
+ collectionOverrides?: (options: {
302
+ collection: CollectionConfig;
303
+ }) => CollectionConfig;
178
304
  };
179
305
  /**
180
306
  * BetterAuth options with the following caveats:
@@ -186,27 +312,38 @@ export interface PayloadBetterAuthPluginOptions {
186
312
  *
187
313
  * @see https://www.better-auth.com/docs/reference/options
188
314
  */
189
- betterAuthOptions?: PayloadBetterAuthOptions;
315
+ betterAuthOptions?: BetterAuthOptions;
190
316
  }
191
- export interface PayloadBetterAuthPlugin {
317
+ export type GenerateAdminInviteUrlFn = (options: {
318
+ payload: Payload;
319
+ token: string;
320
+ }) => string;
321
+ export type ConfigAdminCustom = {
322
+ betterAuth: {
323
+ adminRoutes: {
324
+ [key in keyof typeof adminRoutes]: string;
325
+ };
326
+ };
327
+ };
328
+ export interface BetterAuthPlugin {
192
329
  (config: Config): Config;
193
- pluginOptions: PayloadBetterAuthPluginOptions;
330
+ pluginOptions: BetterAuthPluginOptions;
194
331
  }
195
- export interface PayloadRequestWithBetterAuth<TPlugins extends BetterAuthPlugin[] = []> extends PayloadRequest {
332
+ export interface PayloadRequestWithBetterAuth<TPlugins extends BetterAuthPluginType[] = []> extends PayloadRequest {
196
333
  payload: BasePayload & {
197
334
  betterAuth: BetterAuthReturn<TPlugins>;
198
335
  };
199
336
  }
200
- export type CollectionHookWithBetterAuth<T extends (args: any) => any> = T extends (args: infer A) => infer R ? (args: Omit<A, 'req'> & {
337
+ export type CollectionHookWithBetterAuth<T extends (args: any) => any> = T extends (args: infer A) => infer R ? (args: Omit<A, "req"> & {
201
338
  req: PayloadRequestWithBetterAuth;
202
339
  }) => R : never;
203
- export type EndpointWithBetterAuth = Omit<Endpoint, 'handler'> & {
340
+ export type EndpointWithBetterAuth = Omit<Endpoint, "handler"> & {
204
341
  handler: (req: PayloadRequestWithBetterAuth) => Promise<Response> | Response;
205
342
  };
206
343
  export type ExtractEndpoints<T> = T extends BetterAuthPlugin ? T extends {
207
344
  endpoints?: infer E;
208
345
  } ? E : {} : {};
209
- export type TPlugins<TPlugins extends BetterAuthPlugin[] = BetterAuthPlugin[]> = TPlugins;
346
+ export type TPlugins<TPlugins extends BetterAuthPluginType[] = BetterAuthPluginType[]> = TPlugins;
210
347
  export type PluginInferTypes<T extends TPlugins> = {
211
348
  [K in keyof InferPluginTypes<{
212
349
  plugins: T;
@@ -214,11 +351,12 @@ export type PluginInferTypes<T extends TPlugins> = {
214
351
  plugins: T;
215
352
  }>[K];
216
353
  };
217
- export type BetterAuthReturn<T extends TPlugins> = Omit<ReturnType<typeof betterAuth>, '$Infer'> & {
354
+ export type BetterAuthReturn<T extends TPlugins> = Omit<ReturnType<typeof betterAuth>, "$Infer"> & {
218
355
  api: T extends (infer P)[] ? InferAPI<UnionToIntersection<ExtractEndpoints<P>>> : {};
219
- $Infer: ReturnType<typeof betterAuth>['$Infer'] & PluginInferTypes<T>;
356
+ $Infer: ReturnType<typeof betterAuth>["$Infer"] & PluginInferTypes<T>;
220
357
  };
221
- export type BetterAuthFunctionOptions<P extends TPlugins> = Omit<BetterAuthOptions, 'database' | 'plugins'> & {
358
+ export type BetterAuthFunctionOptions<P extends TPlugins> = Omit<BetterAuthOptions, "database" | "plugins"> & {
222
359
  enableDebugLogs?: boolean;
223
360
  plugins: P;
224
361
  };
362
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/better-auth/plugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EACV,iBAAiB,IAAI,qBAAqB,EAC1C,gBAAgB,IAAI,oBAAoB,EACxC,QAAQ,EACR,gBAAgB,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jdEVuZHBvaW50czxQPj4+XG4gICAgOiB7fTtcbiAgJEluZmVyOiBSZXR1cm5UeXBlPHR5cGVvZiBiZXR0ZXJBdXRoPltcIiRJbmZlclwiXSAmIFBsdWdpbkluZmVyVHlwZXM8VD47XG59O1xuXG5leHBvcnQgdHlwZSBCZXR0ZXJBdXRoRnVuY3Rpb25PcHRpb25zPFAgZXh0ZW5kcyBUUGx1Z2lucz4gPSBPbWl0PFxuICBCZXR0ZXJBdXRoT3B0aW9ucyxcbiAgXCJkYXRhYmFzZVwiIHwgXCJwbHVnaW5zXCJcbj4gJiB7XG4gIGVuYWJsZURlYnVnTG9ncz86IGJvb2xlYW47XG4gIHBsdWdpbnM6IFA7XG59O1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9hQSxXQU1FIn0=
@@ -1,2 +1,3 @@
1
1
  export * from './adapter/types';
2
2
  export * from './plugin/types';
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/better-auth/types.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  export * from './adapter/types';
2
2
  export * from './plugin/types';
3
3
 
4
- //# sourceMappingURL=types.js.map
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iZXR0ZXItYXV0aC90eXBlcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FkYXB0ZXIvdHlwZXMnXG5leHBvcnQgKiBmcm9tICcuL3BsdWdpbi90eXBlcydcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGtCQUFpQjtBQUMvQixjQUFjLGlCQUFnQiJ9
@@ -0,0 +1,4 @@
1
+ export { SyncClerkUsersButton } from './plugin/components/sync-clerk-users-button';
2
+ export { AfterLoginForm } from './plugin/components/after-login-form';
3
+ export { LogoutButton } from './plugin/components/logout-button';
4
+ //# sourceMappingURL=admin-ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-ui.d.ts","sourceRoot":"","sources":["../../src/clerk/admin-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { SyncClerkUsersButton } from './plugin/components/sync-clerk-users-button';
2
+ export { AfterLoginForm } from './plugin/components/after-login-form';
3
+ export { LogoutButton } from './plugin/components/logout-button';
4
+
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbGVyay9hZG1pbi11aS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBTeW5jQ2xlcmtVc2Vyc0J1dHRvbiB9IGZyb20gJy4vcGx1Z2luL2NvbXBvbmVudHMvc3luYy1jbGVyay11c2Vycy1idXR0b24nXG5leHBvcnQgeyBBZnRlckxvZ2luRm9ybSB9IGZyb20gJy4vcGx1Z2luL2NvbXBvbmVudHMvYWZ0ZXItbG9naW4tZm9ybSdcbmV4cG9ydCB7IExvZ291dEJ1dHRvbiB9IGZyb20gJy4vcGx1Z2luL2NvbXBvbmVudHMvbG9nb3V0LWJ1dHRvbiciXSwibmFtZXMiOlsiU3luY0NsZXJrVXNlcnNCdXR0b24iLCJBZnRlckxvZ2luRm9ybSIsIkxvZ291dEJ1dHRvbiJdLCJtYXBwaW5ncyI6IkFBQUEsU0FBU0Esb0JBQW9CLFFBQVEsOENBQTZDO0FBQ2xGLFNBQVNDLGNBQWMsUUFBUSx1Q0FBc0M7QUFDckUsU0FBU0MsWUFBWSxRQUFRLG9DQUFtQyJ9
@@ -1 +1,7 @@
1
- export declare const clerk = "clerk";
1
+ export * from './plugin';
2
+ export * from './types';
3
+ export * from './utils';
4
+ import { clerkPlugin } from './plugin';
5
+ import { clerkAuthStrategy } from './plugin/auth-strategy';
6
+ export { clerkPlugin, clerkAuthStrategy };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clerk/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1,3 +1,8 @@
1
- export const clerk = "clerk";
1
+ export * from './plugin';
2
+ export * from './types';
3
+ export * from './utils';
4
+ import { clerkPlugin } from './plugin';
5
+ import { clerkAuthStrategy } from './plugin/auth-strategy';
6
+ export { clerkPlugin, clerkAuthStrategy };
2
7
 
3
- //# sourceMappingURL=index.js.map
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbGVyay9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3BsdWdpbidcbmV4cG9ydCAqIGZyb20gJy4vdHlwZXMnXG5leHBvcnQgKiBmcm9tICcuL3V0aWxzJ1xuXG5pbXBvcnQgeyBjbGVya1BsdWdpbiB9IGZyb20gJy4vcGx1Z2luJ1xuaW1wb3J0IHsgY2xlcmtBdXRoU3RyYXRlZ3kgfSBmcm9tICcuL3BsdWdpbi9hdXRoLXN0cmF0ZWd5J1xuXG5leHBvcnQgeyBjbGVya1BsdWdpbiwgY2xlcmtBdXRoU3RyYXRlZ3kgfVxuIl0sIm5hbWVzIjpbImNsZXJrUGx1Z2luIiwiY2xlcmtBdXRoU3RyYXRlZ3kiXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsV0FBVTtBQUN4QixjQUFjLFVBQVM7QUFDdkIsY0FBYyxVQUFTO0FBRXZCLFNBQVNBLFdBQVcsUUFBUSxXQUFVO0FBQ3RDLFNBQVNDLGlCQUFpQixRQUFRLHlCQUF3QjtBQUUxRCxTQUFTRCxXQUFXLEVBQUVDLGlCQUFpQixHQUFFIn0=
@@ -0,0 +1,11 @@
1
+ import type { AuthStrategy } from 'payload';
2
+ /**
3
+ * Authentication strategy for Clerk
4
+ * Integrates Payload with Clerk using the official Clerk auth method
5
+ *
6
+ * @param adminRoles - Admin roles
7
+ * @param userSlug - User collection slug
8
+ * @returns Auth strategy
9
+ */
10
+ export declare function clerkAuthStrategy(userSlug?: string): AuthStrategy;
11
+ //# sourceMappingURL=auth-strategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-strategy.d.ts","sourceRoot":"","sources":["../../../src/clerk/plugin/auth-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAM3C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,GAAE,MAAgB,GAAG,YAAY,CA8B1E"}
@@ -0,0 +1,45 @@
1
+ import { auth } from '@clerk/nextjs/server';
2
+ import { getUserByClerkId } from '../utils/user';
3
+ const CLERK_AUTH_STRATEGY_NAME = 'clerk';
4
+ /**
5
+ * Authentication strategy for Clerk
6
+ * Integrates Payload with Clerk using the official Clerk auth method
7
+ *
8
+ * @param adminRoles - Admin roles
9
+ * @param userSlug - User collection slug
10
+ * @returns Auth strategy
11
+ */ export function clerkAuthStrategy(userSlug = 'users') {
12
+ return {
13
+ name: CLERK_AUTH_STRATEGY_NAME,
14
+ authenticate: async ({ payload, strategyName = CLERK_AUTH_STRATEGY_NAME })=>{
15
+ try {
16
+ const { userId } = await auth();
17
+ if (!userId) {
18
+ return {
19
+ user: null
20
+ };
21
+ }
22
+ const user = await getUserByClerkId(payload, userSlug, userId);
23
+ if (!user) {
24
+ return {
25
+ user: null
26
+ };
27
+ }
28
+ return {
29
+ user: {
30
+ ...user,
31
+ collection: userSlug,
32
+ _strategy: strategyName
33
+ }
34
+ };
35
+ } catch (error) {
36
+ console.error('Error in Clerk auth strategy:', error);
37
+ return {
38
+ user: null
39
+ };
40
+ }
41
+ }
42
+ };
43
+ }
44
+
45
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbGVyay9wbHVnaW4vYXV0aC1zdHJhdGVneS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEF1dGhTdHJhdGVneSB9IGZyb20gJ3BheWxvYWQnXG5pbXBvcnQgeyBhdXRoIH0gZnJvbSAnQGNsZXJrL25leHRqcy9zZXJ2ZXInXG5pbXBvcnQgeyBnZXRVc2VyQnlDbGVya0lkIH0gZnJvbSAnLi4vdXRpbHMvdXNlcidcblxuY29uc3QgQ0xFUktfQVVUSF9TVFJBVEVHWV9OQU1FID0gJ2NsZXJrJ1xuXG4vKipcbiAqIEF1dGhlbnRpY2F0aW9uIHN0cmF0ZWd5IGZvciBDbGVya1xuICogSW50ZWdyYXRlcyBQYXlsb2FkIHdpdGggQ2xlcmsgdXNpbmcgdGhlIG9mZmljaWFsIENsZXJrIGF1dGggbWV0aG9kXG4gKiBcbiAqIEBwYXJhbSBhZG1pblJvbGVzIC0gQWRtaW4gcm9sZXNcbiAqIEBwYXJhbSB1c2VyU2x1ZyAtIFVzZXIgY29sbGVjdGlvbiBzbHVnXG4gKiBAcmV0dXJucyBBdXRoIHN0cmF0ZWd5XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjbGVya0F1dGhTdHJhdGVneSh1c2VyU2x1Zzogc3RyaW5nID0gJ3VzZXJzJy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: string[];
4
+ }) => Access;
5
+ export declare const getCreateAccess: ({ adminRoles }: {
6
+ adminRoles: string[];
7
+ }) => Access;
8
+ export declare const getUpdateAccess: ({ adminRoles }: {
9
+ adminRoles: string[];
10
+ }) => Access;
11
+ export declare const getDeleteAccess: ({ adminRoles }: {
12
+ adminRoles: string[];
13
+ }) => Access;
14
+ //# sourceMappingURL=access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../../src/clerk/plugin/collections/users/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,SAAS,CAAA;AAcrD,eAAO,MAAM,aAAa,GAAI,gBAAgB;IAAE,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,KAAG,MAUxE,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,gBAAgB;IAAE,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,KAAG,MAI1E,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,gBAAgB;IAAE,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,KAAG,MAI1E,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,gBAAgB;IAAE,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,KAAG,MAI1E,CAAA"}
@@ -0,0 +1,36 @@
1
+ const isAdmin = (req, adminRoles)=>{
2
+ return Boolean(req.user && adminRoles.includes(req.user.role));
3
+ };
4
+ const isCurrentUser = (req)=>{
5
+ return {
6
+ id: {
7
+ equals: req.user?.id
8
+ }
9
+ };
10
+ };
11
+ export const getReadAccess = ({ adminRoles })=>{
12
+ return ({ req })=>{
13
+ if (!req.user) return false;
14
+ if (isAdmin(req, adminRoles)) {
15
+ return true;
16
+ }
17
+ return isCurrentUser(req);
18
+ };
19
+ };
20
+ export const getCreateAccess = ({ adminRoles })=>{
21
+ return ({ req })=>{
22
+ return isAdmin(req, adminRoles);
23
+ };
24
+ };
25
+ export const getUpdateAccess = ({ adminRoles })=>{
26
+ return ({ req })=>{
27
+ return isAdmin(req, adminRoles);
28
+ };
29
+ };
30
+ export const getDeleteAccess = ({ adminRoles })=>{
31
+ return ({ req })=>{
32
+ return isAdmin(req, adminRoles);
33
+ };
34
+ };
35
+
36
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jbGVyay9wbHVnaW4vY29sbGVjdGlvbnMvdXNlcnMvYWNjZXNzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQWNjZXNzLCBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQnXG5cbmNvbnN0IGlzQWRtaW4gPSAocmVxOiBhbnksIGFkbWluUm9sZXM6IHN0cmluZ1tdKTogYm9vbGVhbiA9PiB7XG4gIHJldHVybiBCb29sZWFuKHJlcS51c2VyICYmIGFkbWluUm9sZXMuaW5jbHVkZXMocmVxLnVzZXIucm9sZSBhcyBzdHJpbmcpKVxufVxuXG5jb25zdCBpc0N1cnJlbnRVc2VyID0gKHJlcTogUGF5bG9hZFJlcXVlc3QpID0+IHtcbiAgcmV0dXJuIHtcbiAgICBpZDoge1xuICAgICAgZXF1YWxzOiByZXEudXNlcj8uaWQsXG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCBjb25zdCBnZXRSZWFkQWNjZXNzID0gKHsgYWRtaW5Sb2xlcyB9OiB7IGFkbWluUm9sZXM6IHN0cmluZ1tdIH0pOiBBY2Nlc3MgPT4ge1xuICByZXR1cm4gKHsgcmVxIH0pID0+IHtcbiAgICBpZiAoIXJlcS51c2VyKSByZXR1cm4gZmFsc2VcbiAgICBcbiAgICBpZiAoaXNBZG1pbihyZXEsIGFkbWluUm9sZXMpKSB7XG4gICAgICByZXR1cm4gdHJ1ZVxuICAgIH1cbiAgICBcbiAgICByZXR1cm4gaXNDdXJyZW50VXNlcihyZXEpXG4gIH1cbn1cblxuZXhwb3J0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LE9BQU87UUFDTE8sSUFBSTtZQUNGQyxRQUFRUixJQUFJRyxJQUFJLEVBQUVJO1FBQ3BCO0lBQ0Y7QUFDRjtBQUVBLE9BQU8sTUFBTUUsZ0JBQWdCLENBQUMsRUFBRVIsVUFBVSxFQUE0QjtJQUNwRSxPQUFPLENBQUMsRUFBRUQsR0FBRyxFQUFFO1FBQ2IsSUFBSSxDQUFDQSxJQUFJRyxJQUFJLEVBQUUsT0FBTztRQUV0QixJQUFJSixRQUFRQyxLQUFLQyxhQUFhO1lBQzVCLE9BQU87UUFDVDtRQUVBLE9BQU9LLGNBQWNOO0lBQ3ZCO0FBQ0YsRUFBQztBQUVELE9BQU8sTUFBTVUsa0JBQWtCLENBQUMsRUFBRVQsVUFBVSxFQUE0QjtJQUN0RSxPQUFPLENBQUMsRUFBRUQsR0FBRyxFQUFFO1FBQ2IsT0FBT0QsUUFBUUMsS0FBS0M7SUFDdEI7QUFDRixFQUFDO0FBRUQsT0FBTyxNQUFNVSxrQkFBa0IsQ0FBQyxFQUFFVixVQUFVLEVBQTRCO0lBQ3RFLE9BQU8sQ0FBQyxFQUFFRCxHQUFHLEVBQUU7UUFDYixPQUFPRCxRQUFRQyxLQUFLQztJQUN0QjtBQUNGLEVBQUM7QUFFRCxPQUFPLE1BQU1XLGtCQUFrQixDQUFDLEVBQUVYLFVBQVUsRUFBNEI7SUFDdEUsT0FBTyxDQUFDLEVBQUVELEdBQUcsRUFBRTtRQUNiLE9BQU9ELFFBQVFDLEtBQUtDO0lBQ3RCO0FBQ0YsRUFBQyJ9
@@ -0,0 +1,14 @@
1
+ import { Endpoint } from "payload";
2
+ export interface SyncClerkUsersResponse {
3
+ syncedUsers: number;
4
+ success: boolean;
5
+ message?: string;
6
+ error?: string;
7
+ count?: number;
8
+ created?: number;
9
+ updated?: number;
10
+ }
11
+ export declare const syncClerkUsersEndpoint: ({ userCollectionSlug, }: {
12
+ userCollectionSlug: string;
13
+ }) => Endpoint;
14
+ //# sourceMappingURL=sync-from-clerk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-from-clerk.d.ts","sourceRoot":"","sources":["../../../../../../src/clerk/plugin/collections/users/endpoints/sync-from-clerk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,MAAM,SAAS,CAAC;AAK7C,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,sBAAsB,GAAI,yBAEpC;IACD,kBAAkB,EAAE,MAAM,CAAC;CAC5B,KAAG,QAiIH,CAAC"}