payload-auth 1.1.2 → 1.3.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.
- package/dist/authjs/index.d.ts.map +1 -1
- package/dist/authjs/index.js +2 -2
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.d.ts +1 -1
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.d.ts.map +1 -1
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.js +3 -3
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.d.ts.map +1 -1
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.js +4 -4
- package/dist/better-auth/adapter/generate-schema/index.js +5 -5
- package/dist/better-auth/adapter/generate-schema/utils.js +1 -1
- package/dist/better-auth/adapter/index.d.ts +2 -2
- package/dist/better-auth/adapter/index.d.ts.map +1 -1
- package/dist/better-auth/adapter/index.js +53 -53
- package/dist/better-auth/adapter/transform/index.d.ts +5 -5
- package/dist/better-auth/adapter/transform/index.d.ts.map +1 -1
- package/dist/better-auth/adapter/transform/index.js +69 -69
- package/dist/better-auth/adapter/types.d.ts +3 -3
- package/dist/better-auth/adapter/types.d.ts.map +1 -1
- package/dist/better-auth/adapter/types.js +1 -1
- package/dist/better-auth/index.js +4 -4
- package/dist/better-auth/plugin/{lib/constants.d.ts → constants.d.ts} +14 -6
- package/dist/better-auth/plugin/constants.d.ts.map +1 -0
- package/dist/better-auth/plugin/constants.js +91 -0
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.js +2 -2
- package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/check-username-plugin.js +2 -2
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.js +7 -7
- package/dist/better-auth/plugin/helpers/get-admin-access.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/get-admin-access.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-admin-access.js +2 -2
- package/dist/better-auth/plugin/helpers/get-all-roles.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/get-all-roles.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-all-roles.js +4 -4
- package/dist/better-auth/plugin/helpers/get-ip.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/get-ip.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-ip.js +14 -14
- package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-requst-collection.js +2 -2
- package/dist/better-auth/plugin/helpers/index.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/index.js +1 -1
- package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts +3 -3
- package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/prepare-session-data.js +1 -1
- package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts +2 -2
- package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/serialize-cookie.js +33 -33
- package/dist/better-auth/plugin/index.d.ts +6 -6
- package/dist/better-auth/plugin/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/index.js +27 -57
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.js +6 -6
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.js +47 -47
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.js +1 -1
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.js +2 -2
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.js +33 -24
- package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/api-keys.js +77 -80
- package/dist/better-auth/plugin/lib/build-collections/index.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/index.js +2 -2
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/invitations.js +30 -30
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/jwks.js +13 -13
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/members.js +22 -22
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.js +33 -33
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.js +40 -40
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.js +20 -20
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/organizations.js +21 -21
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/passkeys.js +37 -37
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/sessions.js +33 -33
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.js +29 -29
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/teams.js +13 -13
- package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/two-factors.js +17 -17
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.js +8 -8
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts +3 -4
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.js +12 -11
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.js +19 -18
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts +3 -2
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.js +28 -6
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.js +9 -8
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.js +34 -30
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.js +7 -6
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.js +11 -11
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.js +2 -2
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.js +3 -3
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.js +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.js +9 -9
- package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/index.js +84 -94
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.js +7 -7
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.js +9 -9
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/verifications.js +17 -17
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts +2 -2
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/get-payload-auth.js +1 -1
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts +2 -2
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.js +7 -7
- package/dist/better-auth/plugin/lib/init-better-auth.d.ts +4 -4
- package/dist/better-auth/plugin/lib/init-better-auth.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/init-better-auth.js +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.js +3 -3
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.js +3 -3
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts +4 -4
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.js +28 -12
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.js +10 -11
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.js +15 -16
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.js +3 -3
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.js +3 -3
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.js +7 -6
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.js +7 -6
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/require-admin-invite-for-sign-up-middleware.d.ts +10 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/require-admin-invite-for-sign-up-middleware.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/require-admin-invite-for-sign-up-middleware.js +43 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts +4 -4
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.js +9 -4
- package/dist/better-auth/plugin/lib/set-login-methods.d.ts +5 -0
- package/dist/better-auth/plugin/lib/set-login-methods.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/set-login-methods.js +16 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts +4 -4
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.js +19 -20
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts +4 -4
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.js +59 -42
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.scss +7 -6
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts +2 -3
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/logout-button.js +8 -11
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts +1 -1
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/rsc-redirect.js +1 -1
- package/dist/better-auth/plugin/payload/components/social-provider-buttons/index.d.ts +14 -0
- package/dist/better-auth/plugin/payload/components/social-provider-buttons/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/social-provider-buttons/index.js +142 -0
- package/dist/better-auth/plugin/payload/components/{admin-social-provider-buttons → social-provider-buttons}/index.scss +4 -1
- package/dist/better-auth/plugin/payload/components/token-field.d.ts +2 -2
- package/dist/better-auth/plugin/payload/components/token-field.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/token-field.js +3 -3
- package/dist/better-auth/plugin/payload/exports/client.d.ts +5 -6
- package/dist/better-auth/plugin/payload/exports/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/exports/client.js +6 -7
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts +6 -9
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/exports/rsc.js +5 -8
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts +1 -1
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.js +6 -5
- package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts +3 -3
- package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/utils/generate-metadata.js +18 -18
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.js +1 -1
- package/dist/better-auth/plugin/payload/views/admin-login/client.d.ts +17 -0
- package/dist/better-auth/plugin/payload/views/admin-login/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-login/client.js +175 -0
- package/dist/better-auth/plugin/payload/views/admin-login/index.d.ts +11 -0
- package/dist/better-auth/plugin/payload/views/admin-login/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-login/index.js +125 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/client.d.ts +15 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/client.js +156 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/index.d.ts +11 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/index.js +71 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts +4 -7
- package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/forgot-password/client.js +70 -100
- package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts +6 -6
- package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/forgot-password/index.js +23 -34
- package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts +4 -2
- package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/reset-password/client.js +88 -53
- package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts +2 -2
- package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/reset-password/index.js +51 -56
- package/dist/better-auth/plugin/types.d.ts +58 -31
- package/dist/better-auth/plugin/types.d.ts.map +1 -1
- package/dist/better-auth/plugin/types.js +1 -1
- package/dist/better-auth/types.js +2 -2
- package/dist/clerk/admin-ui.js +4 -4
- package/dist/clerk/index.js +5 -5
- package/dist/clerk/plugin/auth-strategy.js +4 -4
- package/dist/clerk/plugin/collections/users/access.js +1 -1
- package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.d.ts +2 -2
- package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.d.ts.map +1 -1
- package/dist/clerk/plugin/collections/users/endpoints/sync-from-clerk.js +9 -9
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/index.js +4 -4
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.d.ts.map +1 -1
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userCreated.js +2 -2
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.d.ts.map +1 -1
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userDeleted.js +2 -2
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.d.ts.map +1 -1
- package/dist/clerk/plugin/collections/users/endpoints/webhook/handlers/userUpdated.js +2 -2
- package/dist/clerk/plugin/collections/users/endpoints/webhook/index.d.ts.map +1 -1
- package/dist/clerk/plugin/collections/users/endpoints/webhook/index.js +5 -4
- package/dist/clerk/plugin/collections/users/fields.js +1 -1
- package/dist/clerk/plugin/collections/users/index.d.ts +1 -1
- package/dist/clerk/plugin/collections/users/index.d.ts.map +1 -1
- package/dist/clerk/plugin/collections/users/index.js +7 -7
- package/dist/clerk/plugin/components/after-login-form.js +4 -4
- package/dist/clerk/plugin/components/logout-button.d.ts.map +1 -1
- package/dist/clerk/plugin/components/logout-button.js +17 -17
- package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts +1 -1
- package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts.map +1 -1
- package/dist/clerk/plugin/components/sync-clerk-users-button.js +8 -8
- package/dist/clerk/plugin.d.ts +4 -4
- package/dist/clerk/plugin.d.ts.map +1 -1
- package/dist/clerk/plugin.js +4 -4
- package/dist/clerk/types.js +1 -1
- package/dist/clerk/utils/clerk-user.d.ts.map +1 -1
- package/dist/clerk/utils/clerk-user.js +1 -1
- package/dist/clerk/utils/index.js +4 -4
- package/dist/clerk/utils/load-clerk-instance.d.ts.map +1 -1
- package/dist/clerk/utils/load-clerk-instance.js +2 -2
- package/dist/clerk/utils/svix.d.ts +1 -1
- package/dist/clerk/utils/svix.d.ts.map +1 -1
- package/dist/clerk/utils/svix.js +2 -2
- package/dist/clerk/utils/user.d.ts.map +1 -1
- package/dist/clerk/utils/user.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/kinde/index.d.ts.map +1 -1
- package/dist/kinde/index.js +2 -2
- package/dist/{better-auth/plugin/payload → shared}/components/icons.d.ts +3 -3
- package/dist/shared/components/icons.d.ts.map +1 -0
- package/dist/shared/components/icons.js +437 -0
- package/dist/shared/components/logo.d.ts +4 -0
- package/dist/shared/components/logo.d.ts.map +1 -0
- package/dist/shared/components/logo.js +24 -0
- package/dist/shared/form/components/submit.d.ts +8 -0
- package/dist/shared/form/components/submit.d.ts.map +1 -0
- package/dist/shared/form/components/submit.js +21 -0
- package/dist/shared/form/fields/text-field.d.ts +8 -0
- package/dist/shared/form/fields/text-field.d.ts.map +1 -0
- package/dist/shared/form/fields/text-field.js +41 -0
- package/dist/shared/form/index.d.ts +34 -0
- package/dist/shared/form/index.d.ts.map +1 -0
- package/dist/shared/form/index.js +17 -0
- package/dist/shared/form/ui/header/index.d.ts +9 -0
- package/dist/shared/form/ui/header/index.d.ts.map +1 -0
- package/dist/shared/form/ui/header/index.js +24 -0
- package/dist/shared/form/ui/index.d.ts +31 -0
- package/dist/shared/form/ui/index.d.ts.map +1 -0
- package/dist/shared/form/ui/index.js +57 -0
- package/dist/shared/form/ui/index.scss +27 -0
- package/dist/shared/form/validation.d.ts +103 -0
- package/dist/shared/form/validation.d.ts.map +1 -0
- package/dist/shared/form/validation.js +108 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +4 -0
- package/dist/shared/payload/fields/field-copy-button/index.css +47 -0
- package/dist/shared/payload/fields/field-copy-button/index.d.ts +4 -0
- package/dist/shared/payload/fields/field-copy-button/index.d.ts.map +1 -0
- package/dist/shared/payload/fields/field-copy-button/index.js +38 -0
- package/dist/shared/payload/fields/generate-uuid-button/index.css +14 -0
- package/dist/shared/payload/fields/generate-uuid-button/index.d.ts +4 -0
- package/dist/shared/payload/fields/generate-uuid-button/index.d.ts.map +1 -0
- package/dist/shared/payload/fields/generate-uuid-button/index.js +26 -0
- package/dist/shared/payload/fields/index.d.ts +3 -0
- package/dist/shared/payload/fields/index.d.ts.map +1 -0
- package/dist/shared/payload/fields/index.js +4 -0
- package/dist/shared/utils/regex.d.ts +3 -0
- package/dist/shared/utils/regex.d.ts.map +1 -0
- package/dist/shared/utils/regex.js +4 -0
- package/dist/shared/utils/try-catch.d.ts +12 -0
- package/dist/shared/utils/try-catch.d.ts.map +1 -0
- package/dist/shared/utils/try-catch.js +17 -0
- package/package.json +7 -5
- package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts +0 -14
- package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts.map +0 -1
- package/dist/better-auth/plugin/helpers/get-admin-routes.js +0 -6
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts +0 -3
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.js +0 -96
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts +0 -4
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.js +0 -115
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts +0 -3
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.js +0 -62
- package/dist/better-auth/plugin/lib/constants.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/constants.js +0 -56
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts +0 -14
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.js +0 -111
- package/dist/better-auth/plugin/payload/components/form-header/index.d.ts +0 -9
- package/dist/better-auth/plugin/payload/components/form-header/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/form-header/index.js +0 -23
- package/dist/better-auth/plugin/payload/components/icons.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/icons.js +0 -437
- package/dist/better-auth/plugin/payload/components/logo.d.ts +0 -4
- package/dist/better-auth/plugin/payload/components/logo.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/logo.js +0 -24
- package/dist/better-auth/plugin/payload/components/styles.css +0 -73
- package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts +0 -12
- package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/admin-invite/client.js +0 -92
- package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts +0 -11
- package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/admin-invite/index.js +0 -84
- package/dist/better-auth/plugin/payload/views/admin-invite/index.scss +0 -25
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts +0 -14
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.js +0 -95
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts +0 -12
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.js +0 -144
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.scss +0 -29
- package/dist/better-auth/plugin/payload/views/forgot-password/index.scss +0 -0
- package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts +0 -5
- package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/inactivity/index.js +0 -12
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts +0 -9
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.js +0 -54
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts +0 -1
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.js +0 -121
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.scss +0 -31
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts +0 -56
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.js +0 -3
- package/dist/better-auth/plugin/payload/views/login/form/index.d.ts +0 -17
- package/dist/better-auth/plugin/payload/views/login/form/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/login/form/index.js +0 -137
- package/dist/better-auth/plugin/payload/views/login/form/index.scss +0 -23
- package/dist/better-auth/plugin/payload/views/login/index.d.ts +0 -11
- package/dist/better-auth/plugin/payload/views/login/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/login/index.js +0 -98
- package/dist/better-auth/plugin/payload/views/login/index.scss +0 -10
- package/dist/better-auth/plugin/payload/views/logout/client.d.ts +0 -8
- package/dist/better-auth/plugin/payload/views/logout/client.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/logout/client.js +0 -76
- package/dist/better-auth/plugin/payload/views/logout/index.d.ts +0 -8
- package/dist/better-auth/plugin/payload/views/logout/index.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/logout/index.js +0 -14
- package/dist/better-auth/plugin/payload/views/logout/index.scss +0 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.scss +0 -9
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts +0 -3
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.js +0 -11
- /package/dist/{better-auth/plugin/payload/components/form-header → shared/form/ui/header}/index.scss +0 -0
|
@@ -1,72 +1,107 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React, {
|
|
4
|
-
import {
|
|
3
|
+
import React, { useMemo } from "react";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { Form, FormInputWrap } from "../../../../../shared/form/ui";
|
|
5
6
|
import { useRouter } from "next/navigation.js";
|
|
6
7
|
import { formatAdminURL } from "payload/shared";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
value: ""
|
|
12
|
-
},
|
|
13
|
-
password: {
|
|
14
|
-
initialValue: "",
|
|
15
|
-
valid: false,
|
|
16
|
-
value: ""
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export const PasswordResetClient = ({ token })=>{
|
|
8
|
+
import { createAuthClient } from "better-auth/react";
|
|
9
|
+
import { useAuth, useConfig, useTranslation, toast } from "@payloadcms/ui";
|
|
10
|
+
import { useAppForm } from "../../../../../shared/form";
|
|
11
|
+
export const PasswordResetForm = ({ token })=>{
|
|
20
12
|
const { t } = useTranslation();
|
|
21
|
-
const { config: { serverURL, admin: { user: userSlug, routes: { login: loginRoute } }, routes: { admin: adminRoute, api: apiRoute } } } = useConfig();
|
|
22
13
|
const history = useRouter();
|
|
23
14
|
const { fetchFullUser } = useAuth();
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
const authClient = useMemo(()=>createAuthClient(), []);
|
|
16
|
+
const { config: { admin: { routes: { login: loginRoute } }, routes: { admin: adminRoute } } } = useConfig();
|
|
17
|
+
const resetPasswordSchema = z.object({
|
|
18
|
+
password: z.string().min(1, t('validation:required') || 'Password is required'),
|
|
19
|
+
confirmPassword: z.string().min(1, t('validation:required') || 'Confirm password is required')
|
|
20
|
+
}).refine((data)=>{
|
|
21
|
+
// Only validate matching passwords if both fields have values
|
|
22
|
+
if (data.password && data.confirmPassword) {
|
|
23
|
+
return data.password === data.confirmPassword;
|
|
33
24
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
// If one or both fields are empty, validation will be handled by the min(1) validators
|
|
26
|
+
return true;
|
|
27
|
+
}, {
|
|
28
|
+
message: t('fields:passwordsDoNotMatch') || 'Passwords do not match',
|
|
29
|
+
path: [
|
|
30
|
+
'confirmPassword'
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
const form = useAppForm({
|
|
34
|
+
defaultValues: {
|
|
35
|
+
password: '',
|
|
36
|
+
confirmPassword: ''
|
|
37
|
+
},
|
|
38
|
+
onSubmit: async ({ value })=>{
|
|
39
|
+
const { password } = value;
|
|
40
|
+
try {
|
|
41
|
+
const { data, error } = await authClient.resetPassword({
|
|
42
|
+
newPassword: password,
|
|
43
|
+
token
|
|
44
|
+
});
|
|
45
|
+
if (error) {
|
|
46
|
+
toast.error(error.message || 'Error resetting password');
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (data?.status) {
|
|
50
|
+
const user = await fetchFullUser();
|
|
51
|
+
if (user) {
|
|
52
|
+
history.push(adminRoute);
|
|
53
|
+
} else {
|
|
54
|
+
history.push(formatAdminURL({
|
|
55
|
+
adminRoute,
|
|
56
|
+
path: loginRoute
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
toast.success(t('authentication:passwordResetSuccessfully'));
|
|
60
|
+
}
|
|
61
|
+
} catch (e) {
|
|
62
|
+
toast.error('An unexpected error occurred');
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
validators: {
|
|
66
|
+
onSubmit: resetPasswordSchema
|
|
67
|
+
}
|
|
68
|
+
});
|
|
40
69
|
return /*#__PURE__*/ _jsxs(Form, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
70
|
+
onSubmit: (e)=>{
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
void form.handleSubmit();
|
|
73
|
+
},
|
|
45
74
|
children: [
|
|
46
|
-
/*#__PURE__*/ _jsxs(
|
|
47
|
-
className: "inputWrap",
|
|
75
|
+
/*#__PURE__*/ _jsxs(FormInputWrap, {
|
|
48
76
|
children: [
|
|
49
|
-
/*#__PURE__*/ _jsx(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
77
|
+
/*#__PURE__*/ _jsx(form.AppField, {
|
|
78
|
+
name: "password",
|
|
79
|
+
children: (field)=>/*#__PURE__*/ _jsx(field.TextField, {
|
|
80
|
+
type: "password",
|
|
81
|
+
className: "password",
|
|
82
|
+
label: t('authentication:newPassword'),
|
|
83
|
+
required: true
|
|
84
|
+
})
|
|
56
85
|
}),
|
|
57
|
-
/*#__PURE__*/ _jsx(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
86
|
+
/*#__PURE__*/ _jsx(form.AppField, {
|
|
87
|
+
name: "confirmPassword",
|
|
88
|
+
children: (field)=>/*#__PURE__*/ _jsx(field.TextField, {
|
|
89
|
+
type: "password",
|
|
90
|
+
className: "password",
|
|
91
|
+
label: t('authentication:confirmPassword'),
|
|
92
|
+
required: true
|
|
93
|
+
})
|
|
61
94
|
})
|
|
62
95
|
]
|
|
63
96
|
}),
|
|
64
|
-
/*#__PURE__*/ _jsx(
|
|
65
|
-
|
|
66
|
-
|
|
97
|
+
/*#__PURE__*/ _jsx(form.AppForm, {
|
|
98
|
+
children: /*#__PURE__*/ _jsx(form.Submit, {
|
|
99
|
+
label: t('authentication:resetPassword'),
|
|
100
|
+
loadingLabel: t('general:loading')
|
|
101
|
+
})
|
|
67
102
|
})
|
|
68
103
|
]
|
|
69
104
|
});
|
|
70
105
|
};
|
|
71
106
|
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
107
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vcGF5bG9hZC92aWV3cy9yZXNldC1wYXNzd29yZC9jbGllbnQudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50J1xuXG5pbXBvcnQgUmVhY3QsIHsgdXNlTWVtbyB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgeiB9IGZyb20gJ3pvZCdcbmltcG9ydCB7IEZvcm0sIEZvcm1JbnB1dFdyYXAgfSBmcm9tICdAL3NoYXJlZC9mb3JtL3VpJ1xuaW1wb3J0IHsgRm9ybUhlYWRlciB9IGZyb20gJ0Avc2hhcmVkL2Zvcm0vdWkvaGVhZGVyJ1xuaW1wb3J0IHsgdXNlUm91dGVyIH0gZnJvbSAnbmV4dC9uYXZpZ2F0aW9uLmpzJ1xuaW1wb3J0IHsgZm9ybWF0QWRtaW5VUkwgfSBmcm9tICdwYXlsb2FkL3NoYXJlZCdcbmltcG9ydCB7IGNyZWF0ZUF1dGhDbGllbnQgfSBmcm9tICdiZXR0ZXItYXV0aC9yZWFjdCdcbmltcG9ydCB7IHVzZUF1dGgsIHVzZUNvbmZpZywgdXNlVHJhbnNsYXRpb24sIHRvYXN0IH0gZnJvbSAnQHBheWxvYWRjbXMvdWknXG5pbXBvcnQgeyB1c2VBcHBGb3JtIH0gZnJvbSAnQC9zaGFyZWQvZm9ybSdcblxudHlwZSBQYXNzd29yZFJlc2V0Rm9ybUFyZ3MgPSB7XG4gIHJlYWRvbmx5IHRva2V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mQnKVxuICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG4gICAgICAgIGlmIChkYXRhPy5zdGF0dXMpIHtcbiAgICAgICAgICBjb25zdCB1c2VyID0gYXdhaXQgZmV0Y2hGdWxsVXNlcigpXG4gICAgICAgICAgaWYgKHVzZXIpIHtcbiAgICAgICAgICAgIGhpc3RvcnkucHVzaChhZG1pblJvdXRlKVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBoaXN0b3J5LnB1c2goXG4gICAgICAgICAgICAgIGZvcm1hdEFkbWluVVJMKHtcbiAgICAgICAgICAgICAgICBhZG1pblJvdXRlLFxuICAgICAgICAgICAgICAgIHBhdGg6IGxvZ2luUm91dGVcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgdG9hc3Quc3VjY2Vzcyh0KCdhdXRoZW50aWNhdGlvbjpwYXNzd29yZFJlc2V0U3VjY2Vzc2Z1bGx5JykpXG4gICAgICAgIH1cbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgdG9hc3QuZXJyb3IoJ0FuIHVuZXhwZWN0ZWQgZXJyb3Igb2NjdXJyZWQnKVxuICAgICAgfVxuICAgIH0sXG4gICAgdmFsaWRhdG9yczoge1xuICAgICAgb25TdWJtaXQ6IHJlc2V0UGFzc3dvcmRTY2hlbWFcbiAgICB9XG4gIH0pXG5cbiAgcmV0dXJuIChcbiAgICA8Rm9ybVxuICAgICAgb25TdWJtaXQ9eyhlKSA9PiB7XG4gICAgICAgIGUucHJldmVudERlZmF1bHQoKVxuICAgICAgICB2b2lkIGZvcm0uaGFuZGxlU3VibWl0KClcbiAgICAgIH19PlxuICAgICAgPEZvcm1JbnB1dFdyYXA+XG4gICAgICAgIDxmb3JtLkFwcEZpZWxkXG4gICAgICAgICAgbmFtZT1cInBhc3N3b3JkXCJcbiAgICAgICAgICBjaGlsZHJlbj17KGZpZWxkKSA9PiA8ZmllbGQuVGV4dEZp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QUFFO2dDQUFtQzJDLFFBQVE7Ozs7OzBCQUloSCxLQUFDdkIsS0FBS3dCLE9BQU87Z0JBQUNQLHdCQUFVLEtBQUNqQixLQUFLeUIsTUFBTTtvQkFBQ0gsT0FBTzFDLEVBQUU7b0JBQWlDOEMsY0FBYzlDLEVBQUU7Ozs7O0FBR3JHLEVBQUMifQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { AdminViewServerProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AdminViewServerProps } from 'payload';
|
|
3
3
|
declare const ResetPassword: React.FC<AdminViewServerProps>;
|
|
4
4
|
export default ResetPassword;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/reset-password/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/reset-password/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAenD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqEjD,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { MinimalTemplate } from "@payloadcms/next/templates";
|
|
3
4
|
import { Button, Link, Translation } from "@payloadcms/ui";
|
|
4
5
|
import { formatAdminURL } from "payload/shared";
|
|
5
|
-
import { PasswordResetClient } from "./client";
|
|
6
|
-
import { getAdminRoutes } from "../../../helpers/get-admin-routes";
|
|
7
6
|
import { z } from "zod";
|
|
8
|
-
import { FormHeader } from "
|
|
7
|
+
import { FormHeader } from "../../../../../shared/form/ui/header";
|
|
8
|
+
import { PasswordResetForm } from "./client";
|
|
9
|
+
import { adminRoutes } from "../../../constants";
|
|
9
10
|
const resetPasswordParamsSchema = z.object({
|
|
10
11
|
token: z.string()
|
|
11
12
|
});
|
|
13
|
+
const resetPasswordBaseClass = 'reset-password';
|
|
12
14
|
const ResetPassword = ({ initPageResult, searchParams })=>{
|
|
13
|
-
const { req: { user, t, payload: { config: { routes: { admin: adminRoute }, admin: {
|
|
15
|
+
const { req: { user, t, payload: { config: { routes: { admin: adminRoute }, admin: { routes: { account: accountRoute } } } } } } = initPageResult;
|
|
14
16
|
if (user) {
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
-
className:
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
i18nKey: "authentication:loggedInChangePassword",
|
|
33
|
-
t: t
|
|
34
|
-
}),
|
|
35
|
-
heading: t("authentication:alreadyLoggedIn")
|
|
17
|
+
return /*#__PURE__*/ _jsxs(MinimalTemplate, {
|
|
18
|
+
className: `${resetPasswordBaseClass}`,
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(FormHeader, {
|
|
21
|
+
description: /*#__PURE__*/ _jsx(Translation, {
|
|
22
|
+
elements: {
|
|
23
|
+
'0': ({ children })=>/*#__PURE__*/ _jsx(Link, {
|
|
24
|
+
href: formatAdminURL({
|
|
25
|
+
adminRoute,
|
|
26
|
+
path: accountRoute
|
|
27
|
+
}),
|
|
28
|
+
prefetch: false,
|
|
29
|
+
children: children
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
i18nKey: "authentication:loggedInChangePassword",
|
|
33
|
+
t: t
|
|
36
34
|
}),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
heading: t('authentication:alreadyLoggedIn')
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
38
|
+
buttonStyle: "secondary",
|
|
39
|
+
el: "link",
|
|
40
|
+
size: "large",
|
|
41
|
+
to: adminRoute,
|
|
42
|
+
children: t('general:backToDashboard')
|
|
43
|
+
})
|
|
44
|
+
]
|
|
46
45
|
});
|
|
47
46
|
}
|
|
48
47
|
const resetPasswordParams = resetPasswordParamsSchema.safeParse(searchParams);
|
|
@@ -52,30 +51,26 @@ const ResetPassword = ({ initPageResult, searchParams })=>{
|
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
53
|
const { token } = resetPasswordParams.data;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
return /*#__PURE__*/ _jsxs(MinimalTemplate, {
|
|
55
|
+
className: `${resetPasswordBaseClass}`,
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ _jsx(FormHeader, {
|
|
58
|
+
heading: t('authentication:resetPassword')
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ _jsx(PasswordResetForm, {
|
|
61
|
+
token: token
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ _jsx(Link, {
|
|
64
|
+
href: formatAdminURL({
|
|
65
|
+
adminRoute,
|
|
66
|
+
path: adminRoutes.adminLogin
|
|
66
67
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}),
|
|
72
|
-
prefetch: false,
|
|
73
|
-
children: t("authentication:backToLogin")
|
|
74
|
-
})
|
|
75
|
-
]
|
|
76
|
-
})
|
|
68
|
+
prefetch: false,
|
|
69
|
+
children: t('authentication:backToLogin')
|
|
70
|
+
})
|
|
71
|
+
]
|
|
77
72
|
});
|
|
78
73
|
};
|
|
79
74
|
export default ResetPassword;
|
|
80
75
|
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vcGF5bG9hZC92aWV3cy9yZXNldC1wYXNzd29yZC9pbmRleC50c3giXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgTWluaW1hbFRlbXBsYXRlIH0gZnJvbSAnQHBheWxvYWRjbXMvbmV4dC90ZW1wbGF0ZXMnXG5pbXBvcnQgeyBCdXR0b24sIExpbmssIFRyYW5zbGF0aW9uIH0gZnJvbSAnQHBheWxvYWRjbXMvdWknXG5pbXBvcnQgdHlwZSB7IEFkbWluVmlld1NlcnZlclByb3BzIH0gZnJvbSAncGF5bG9hZCdcbmltcG9ydCB7IGZvcm1hdEFkbWluVVJMIH0gZnJvbSAncGF5bG9hZC9zaGFyZWQnXG5cbmltcG9ydCB7IHogfSBmcm9tICd6b2QnXG5cbmltcG9ydCB7IEZvcm1IZWFkZXIgfSBmcm9tICdAL3NoYXJlZC9mb3JtL3VpL2hlYWRlcidcbmltcG9ydCB7IFBhc3N3b3JkUmVzZXRGb3JtIH0gZnJvbSAnLi9jbGllbnQnXG5pbXBvcnQgeyBhZG1pblJvdXRlcyB9IGZyb20gJ0AvYmV0dGVyLWF1dGgvcGx1Z2luL2NvbnN0YW50cydcblxuY29uc3QgcmVzZXRQYXNzd29yZFBhcmFtc1NjaGVtYSA9IHoub2JqZWN0KHtcbiAgdG9rZW46IHouc3RyaW5nKClcbn0pXG5cbmNvbnN0IHJlc2V0UGFzc3dvcmRCYXNlQ2xhc3MgPSAncmVzZXQtcGFzc3dvcmQnXG5cbmNvbnN0IFJlc2V0UGFzc3dvcmQ6IFJlYWN0LkZDPEFkbWluVmlld1NlcnZlclByb3BzPiA9ICh7IGluaXRQYWdlUmVzdWx0LCBzZWFyY2hQYXJhbXMgfSkgPT4ge1xuICBjb25zdCB7XG4gICAgcmVxOiB7XG4gICAgICB1c2VyLFxuICAgICAgdCxcbiAgICAgIHBheWxvYWQ6IHtcbiAgICAgICAgY29uZmlnOiB7XG4gICAgICAgICAgcm91dGVzOiB7IGFkbWluOiBhZG1pblJvdXRlIH0sXG4gICAgICAgICAgYWRtaW46IHtcbiAgICAgICAgICAgIHJvdXRlczogeyBhY2NvdW50OiBhY2NvdW50Um91dGUgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSA9IGluaXRQYWdlUmVzdWx0XG5cbiAgaWYgKHVzZXIpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPE1pbmltYWxUZW1wbGF0ZSBjbGFzc05hbWU9e2Ake3Jlc2V0UGFzc3dvcmRCYXNlQ2xhc3N9YH0+XG4gICAgICAgIDxGb3JtSGVhZGVyXG4gICAgICAgICAgZGVzY3JpcHRpb249e1xuICAgICAgICAgICAgPFRyYW5zbGF0aW9uXG4gICAgICAgICAgICAgIGVsZW1lbnRzPXt7XG4gICAgICAgICAgICAgICAgJzAnOiAoeyBjaGlsZHJlbiB9KSA9PiAoXG4gICAgICAgICAgICAgICAgICA8TGlua1xuICAgICAgICAgICAgICAgICAgICBocmVmPXtmb3JtYXRBZG1pblVSTCh7XG4gICAgICAgICAgICAgICAgICAgICAgYWRtaW5Sb3V0ZSxcbiAgICAgICAgICAgICAgICAgICAgICBwYXRoOiBhY2NvdW50Um91dGVcbiAgICAgICAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgICAgICAgIHByZWZldGNoPXtmYWxzZX1cbiAgICAgICAgICAgICAgICA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xFQUFFQyxRQUFRLEVBQUUsaUJBQ2hCLEtBQUM1QjtvQ0FDQzZCLE1BQU0zQixlQUFlO3dDQUNuQm9CO3dDQUNBUSxNQUFNTjtvQ0FDUjtvQ0FDQU8sVUFBVTs4Q0FFVEg7O3dCQUdQO3dCQUNBSSxTQUFRO3dCQUNSZixHQUFHQTs7b0JBR1BnQixTQUFTaEIsRUFBRTs7OEJBRWIsS0FBQ2xCO29CQUFPbUMsYUFBWTtvQkFBWUMsSUFBRztvQkFBT0MsTUFBSztvQkFBUUMsSUFBSWY7OEJBQ3hETCxFQUFFOzs7O0lBSVg7SUFFQSxNQUFNcUIsc0JBQXNCL0IsMEJBQTBCZ0MsU0FBUyxDQUFDekI7SUFDaEUsSUFBSSxDQUFDd0Isb0JBQW9CRSxPQUFPLEVBQUU7UUFDaEMscUJBQU8sS0FBQ0M7c0JBQUk7O0lBQ2Q7SUFDQSxNQUFNLEVBQUVoQyxLQUFLLEVBQUUsR0FBRzZCLG9CQUFvQkksSUFBSTtJQUUxQyxxQkFDRSxNQUFDNUM7UUFBZ0IyQixXQUFXLEdBQUdkLHdCQUF3Qjs7MEJBQ3JELEtBQUNQO2dCQUFXNkIsU0FBU2hCLEVBQUU7OzBCQUN2QixLQUFDWjtnQkFBa0JJLE9BQU9BOzswQkFDMUIsS0FBQ1Q7Z0JBQ0M2QixNQUFNM0IsZUFBZTtvQkFDbkJvQjtvQkFDQVEsTUFBTXhCLFlBQVlxQyxVQUFVO2dCQUM5QjtnQkFDQVosVUFBVTswQkFFVGQsRUFBRTs7OztBQUlYO0FBRUEsZUFBZUwsY0FBYSJ9
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { UnionToIntersection, betterAuth } from
|
|
2
|
-
import type { BetterAuthOptions as BetterAuthOptionsType, BetterAuthPlugin as BetterAuthPluginType, InferAPI, InferPluginTypes } from
|
|
3
|
-
import type { BasePayload, CollectionConfig, Config, Endpoint, Payload, PayloadRequest } from
|
|
4
|
-
import { adminRoutes } from
|
|
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, loginMethods, socialProviders } from './constants';
|
|
5
5
|
/**
|
|
6
6
|
* BetterAuth options with the following caveats:
|
|
7
7
|
* - The `database` option is removed as it is configured internally
|
|
@@ -12,22 +12,17 @@ import { adminRoutes } from "./lib/constants";
|
|
|
12
12
|
*
|
|
13
13
|
* @see https://www.better-auth.com/docs/reference/options
|
|
14
14
|
*/
|
|
15
|
-
export interface BetterAuthOptions extends Omit<BetterAuthOptionsType,
|
|
16
|
-
user?: Omit<NonNullable<BetterAuthOptionsType[
|
|
17
|
-
account?: Omit<NonNullable<BetterAuthOptionsType[
|
|
18
|
-
session?: Omit<NonNullable<BetterAuthOptionsType[
|
|
19
|
-
verification?: Omit<NonNullable<BetterAuthOptionsType[
|
|
20
|
-
advanced?: Omit<NonNullable<BetterAuthOptionsType[
|
|
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;
|
|
21
21
|
}
|
|
22
|
-
export interface SanitizedBetterAuthOptions extends Omit<BetterAuthOptionsType,
|
|
22
|
+
export interface SanitizedBetterAuthOptions extends Omit<BetterAuthOptionsType, 'database'> {
|
|
23
23
|
}
|
|
24
|
-
export type SocialProvider =
|
|
25
|
-
export type
|
|
26
|
-
[key in SocialProvider]?: {
|
|
27
|
-
enabled?: boolean;
|
|
28
|
-
disableSignUp?: boolean;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
24
|
+
export type SocialProvider = (typeof socialProviders)[number];
|
|
25
|
+
export type LoginMethod = (typeof loginMethods)[number];
|
|
31
26
|
export interface BetterAuthPluginOptions {
|
|
32
27
|
/**
|
|
33
28
|
* Disable the plugin
|
|
@@ -54,15 +49,13 @@ export interface BetterAuthPluginOptions {
|
|
|
54
49
|
*
|
|
55
50
|
* These components will be used to render the login, create first admin, and other auth-related views
|
|
56
51
|
*/
|
|
57
|
-
|
|
52
|
+
admin?: {
|
|
58
53
|
/**
|
|
59
|
-
*
|
|
54
|
+
* Override which social buttons are shown in the Payload Login / Sign Up view.
|
|
60
55
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* Make sure to include the provider in the betterAuthOptions.socialProviders array
|
|
56
|
+
* Provide an array of LoginMethod keys.
|
|
64
57
|
*/
|
|
65
|
-
|
|
58
|
+
loginMethods?: LoginMethod[];
|
|
66
59
|
};
|
|
67
60
|
/**
|
|
68
61
|
* Debug options
|
|
@@ -89,6 +82,22 @@ export interface BetterAuthPluginOptions {
|
|
|
89
82
|
* @default "Auth"
|
|
90
83
|
*/
|
|
91
84
|
collectionAdminGroup?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Require a valid admin invitation for any *public* sign‑up.
|
|
87
|
+
*
|
|
88
|
+
* – Applies to both email/password and social‑provider flows.
|
|
89
|
+
* – Existing users can still sign in; admins can still create users via
|
|
90
|
+
* the Payload UI or server‑side calls.
|
|
91
|
+
* – Ignores provider‑level `disableImplicitSignUp` and `disableSignUp`:
|
|
92
|
+
* with a valid invite the sign‑up proceeds, without one it's blocked.
|
|
93
|
+
* – Also sets `disableImplicitSignUp` for all providers, requiring `requestSignUp` to be true for all `authClient.signIn.social` calls when creating a new account with a provider.
|
|
94
|
+
*
|
|
95
|
+
* Enable when you want OAuth for internal/admin use only and no public
|
|
96
|
+
* registrations at all.
|
|
97
|
+
*
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
requireAdminInviteForSignUp?: boolean;
|
|
92
101
|
/**
|
|
93
102
|
* Configure the Users collections:
|
|
94
103
|
*/
|
|
@@ -290,6 +299,13 @@ export interface BetterAuthPluginOptions {
|
|
|
290
299
|
* @returns The admin invite url
|
|
291
300
|
*/
|
|
292
301
|
generateInviteUrl?: GenerateAdminInviteUrlFn;
|
|
302
|
+
/**
|
|
303
|
+
* This will be used to send the admin invite email
|
|
304
|
+
*
|
|
305
|
+
* @param options Object containing payload, email and the url
|
|
306
|
+
* @returns The admin invite url
|
|
307
|
+
*/
|
|
308
|
+
sendInviteEmail?: SendAdminInviteEmailFn;
|
|
293
309
|
/**
|
|
294
310
|
* Function to override the collection configuration
|
|
295
311
|
*
|
|
@@ -314,6 +330,17 @@ export interface BetterAuthPluginOptions {
|
|
|
314
330
|
*/
|
|
315
331
|
betterAuthOptions?: BetterAuthOptions;
|
|
316
332
|
}
|
|
333
|
+
export type SendAdminInviteEmailFn = (options: {
|
|
334
|
+
payload: Payload;
|
|
335
|
+
email: string;
|
|
336
|
+
url: string;
|
|
337
|
+
}) => Promise<{
|
|
338
|
+
success: true;
|
|
339
|
+
message?: string;
|
|
340
|
+
} | {
|
|
341
|
+
success: false;
|
|
342
|
+
message: string;
|
|
343
|
+
}>;
|
|
317
344
|
export type GenerateAdminInviteUrlFn = (options: {
|
|
318
345
|
payload: Payload;
|
|
319
346
|
token: string;
|
|
@@ -334,15 +361,15 @@ export interface PayloadRequestWithBetterAuth<TPlugins extends BetterAuthPluginT
|
|
|
334
361
|
betterAuth: BetterAuthReturn<TPlugins>;
|
|
335
362
|
};
|
|
336
363
|
}
|
|
337
|
-
export type CollectionHookWithBetterAuth<T extends (args: any) => any> = T extends (args: infer A) => infer R ? (args: Omit<A,
|
|
364
|
+
export type CollectionHookWithBetterAuth<T extends (args: any) => any> = T extends (args: infer A) => infer R ? (args: Omit<A, 'req'> & {
|
|
338
365
|
req: PayloadRequestWithBetterAuth;
|
|
339
366
|
}) => R : never;
|
|
340
|
-
export type EndpointWithBetterAuth = Omit<Endpoint,
|
|
367
|
+
export type EndpointWithBetterAuth = Omit<Endpoint, 'handler'> & {
|
|
341
368
|
handler: (req: PayloadRequestWithBetterAuth) => Promise<Response> | Response;
|
|
342
369
|
};
|
|
343
|
-
export type ExtractEndpoints<T> = T extends BetterAuthPlugin ? T extends {
|
|
370
|
+
export type ExtractEndpoints<T> = T extends BetterAuthPlugin ? (T extends {
|
|
344
371
|
endpoints?: infer E;
|
|
345
|
-
} ? E : {} : {};
|
|
372
|
+
} ? E : {}) : {};
|
|
346
373
|
export type TPlugins<TPlugins extends BetterAuthPluginType[] = BetterAuthPluginType[]> = TPlugins;
|
|
347
374
|
export type PluginInferTypes<T extends TPlugins> = {
|
|
348
375
|
[K in keyof InferPluginTypes<{
|
|
@@ -351,11 +378,11 @@ export type PluginInferTypes<T extends TPlugins> = {
|
|
|
351
378
|
plugins: T;
|
|
352
379
|
}>[K];
|
|
353
380
|
};
|
|
354
|
-
export type BetterAuthReturn<T extends TPlugins> = Omit<ReturnType<typeof betterAuth>,
|
|
381
|
+
export type BetterAuthReturn<T extends TPlugins> = Omit<ReturnType<typeof betterAuth>, '$Infer'> & {
|
|
355
382
|
api: T extends (infer P)[] ? InferAPI<UnionToIntersection<ExtractEndpoints<P>>> : {};
|
|
356
|
-
$Infer: ReturnType<typeof betterAuth>[
|
|
383
|
+
$Infer: ReturnType<typeof betterAuth>['$Infer'] & PluginInferTypes<T>;
|
|
357
384
|
};
|
|
358
|
-
export type BetterAuthFunctionOptions<P extends TPlugins> = Omit<BetterAuthOptions,
|
|
385
|
+
export type BetterAuthFunctionOptions<P extends TPlugins> = Omit<BetterAuthOptions, 'database' | 'plugins'> & {
|
|
359
386
|
enableDebugLogs?: boolean;
|
|
360
387
|
plugins: P;
|
|
361
388
|
};
|
|
@@ -1 +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,
|
|
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,CAAA;AAClE,OAAO,KAAK,EACV,iBAAiB,IAAI,qBAAqB,EAC1C,gBAAgB,IAAI,oBAAoB,EACxC,QAAQ,EACR,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACvG,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAExE;;;;;;;;;GASG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9G,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAA;IAC3F,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAA;IACjG,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC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