payload-auth 1.1.1 → 1.2.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} +12 -6
- package/dist/better-auth/plugin/constants.d.ts.map +1 -0
- package/dist/better-auth/plugin/constants.js +62 -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 +4 -3
- 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 +19 -53
- 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 +12 -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/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 +4 -4
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts +2 -2
- 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 +18 -18
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts +2 -2
- 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 +58 -40
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.scss +2 -3
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts +3 -3
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.js +7 -9
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.scss +4 -1
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts +1 -1
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/logout-button.js +7 -9
- 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/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 +2 -3
- 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 +18 -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 +192 -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 +126 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/client.d.ts +16 -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 +190 -0
- package/dist/better-auth/plugin/payload/views/admin-signup/index.d.ts +12 -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 +114 -0
- package/dist/better-auth/plugin/payload/views/{create-first-admin → admin-signup}/index.scss +1 -1
- 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 +72 -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 +37 -19
- 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 +60 -0
- package/dist/shared/form/ui/index.scss +12 -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/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/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,13 +1,12 @@
|
|
|
1
|
-
import { baseCollectionSlugs, betterAuthPluginSlugs } from "
|
|
1
|
+
import { baseCollectionSlugs, betterAuthPluginSlugs } from "../../constants";
|
|
2
2
|
export function configureOrganizationPlugin(plugin) {
|
|
3
3
|
plugin.schema = plugin?.schema ?? {};
|
|
4
|
-
// Initialize missing schema objects
|
|
5
4
|
[
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
'organization',
|
|
6
|
+
'member',
|
|
7
|
+
'invitation',
|
|
8
|
+
'team',
|
|
9
|
+
'session'
|
|
11
10
|
].forEach((key)=>{
|
|
12
11
|
if (!plugin.schema[key]) plugin.schema[key] = {};
|
|
13
12
|
});
|
|
@@ -27,15 +26,15 @@ export function configureOrganizationPlugin(plugin) {
|
|
|
27
26
|
...plugin?.schema?.member?.fields ?? {},
|
|
28
27
|
organizationId: {
|
|
29
28
|
...plugin?.schema?.member?.fields?.organizationId ?? {},
|
|
30
|
-
fieldName:
|
|
29
|
+
fieldName: 'organization'
|
|
31
30
|
},
|
|
32
31
|
userId: {
|
|
33
32
|
...plugin?.schema?.member?.fields?.userId ?? {},
|
|
34
|
-
fieldName:
|
|
33
|
+
fieldName: 'user'
|
|
35
34
|
},
|
|
36
35
|
teamId: {
|
|
37
36
|
...plugin?.schema?.member?.fields?.teamId ?? {},
|
|
38
|
-
fieldName:
|
|
37
|
+
fieldName: 'team'
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
},
|
|
@@ -46,15 +45,15 @@ export function configureOrganizationPlugin(plugin) {
|
|
|
46
45
|
...plugin?.schema?.invitation?.fields ?? {},
|
|
47
46
|
organizationId: {
|
|
48
47
|
...plugin?.schema?.invitation?.fields?.organizationId ?? {},
|
|
49
|
-
fieldName:
|
|
48
|
+
fieldName: 'organization'
|
|
50
49
|
},
|
|
51
50
|
inviterId: {
|
|
52
51
|
...plugin?.schema?.invitation?.fields?.inviterId ?? {},
|
|
53
|
-
fieldName:
|
|
52
|
+
fieldName: 'inviter'
|
|
54
53
|
},
|
|
55
54
|
teamId: {
|
|
56
55
|
...plugin?.schema?.invitation?.fields?.teamId ?? {},
|
|
57
|
-
fieldName:
|
|
56
|
+
fieldName: 'team'
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
},
|
|
@@ -65,7 +64,7 @@ export function configureOrganizationPlugin(plugin) {
|
|
|
65
64
|
...plugin?.schema?.team?.fields ?? {},
|
|
66
65
|
organizationId: {
|
|
67
66
|
...plugin?.schema?.team?.fields?.organizationId ?? {},
|
|
68
|
-
fieldName:
|
|
67
|
+
fieldName: 'organization'
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
},
|
|
@@ -76,11 +75,11 @@ export function configureOrganizationPlugin(plugin) {
|
|
|
76
75
|
...plugin?.schema?.session?.fields ?? {},
|
|
77
76
|
activeOrganizationId: {
|
|
78
77
|
...plugin?.schema?.session?.fields?.activeOrganizationId ?? {},
|
|
79
|
-
fieldName:
|
|
78
|
+
fieldName: 'activeOrganization'
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
};
|
|
84
83
|
}
|
|
85
84
|
|
|
86
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
85
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vbGliL3Nhbml0aXplLWJldHRlci1hdXRoLW9wdGlvbnMvb3JnYW5pemF0aW9ucy1wbHVnaW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYmFzZUNvbGxlY3Rpb25TbHVncywgYmV0dGVyQXV0aFBsdWdpblNsdWdzIH0gZnJvbSAnQC9iZXR0ZXItYXV0aC9wbHVnaW4vY29uc3RhbnRzJ1xuXG5leHBvcnQgZnVuY3Rpb24gY29uZmlndXJlT3JnYW5pemF0aW9uUGx1Z2luKHBsdWdpbjogYW55KSB7XG4gIHBsdWdpbi5zY2hlbWEgPSBwbHVnaW4/LnNjaGVtYSA/PyB7fVxuXG4gIC8vIEluaXRpYWxpemUgbWlzc2luZyBzY2hlbWEgb2JqZWN0c1xuICA7Wydvcmdhbml6YXRpb24nLCAnbWVtYmVyJywgJ2ludml0YXRpb24nLCAndGVhbScsICdzZXNzaW9uJ10uZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgaWYgKCFwbHVnaW4uc2NoZW1hW2tleV0pIHBsdWdpbi5zY2hlbWFba2V5XSA9IHt9XG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LFFBQVFDLFFBQVFrQixTQUFTWixRQUFRYyx3QkFBd0IsQ0FBQyxDQUFDO29CQUMvRFYsV0FBVztnQkFDYjtZQUNGO1FBQ0Y7SUFDRjtBQUNGIn0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { betterAuthPluginSlugs } from "
|
|
1
|
+
import { betterAuthPluginSlugs } from "../../constants";
|
|
2
2
|
export function configurePasskeyPlugin(plugin) {
|
|
3
3
|
plugin.schema = plugin?.schema ?? {};
|
|
4
4
|
plugin.schema.passkey = {
|
|
@@ -8,10 +8,10 @@ export function configurePasskeyPlugin(plugin) {
|
|
|
8
8
|
...plugin?.schema?.passkey?.fields ?? {},
|
|
9
9
|
userId: {
|
|
10
10
|
...plugin?.schema?.passkey?.fields?.userId ?? {},
|
|
11
|
-
fieldName:
|
|
11
|
+
fieldName: 'user'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vbGliL3Nhbml0aXplLWJldHRlci1hdXRoLW9wdGlvbnMvcGFzc2tleS1wbHVnaW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYmV0dGVyQXV0aFBsdWdpblNsdWdzIH0gZnJvbSAnQC9iZXR0ZXItYXV0aC9wbHVnaW4vY29uc3RhbnRzJ1xuXG5leHBvcnQgZnVuY3Rpb24gY29uZmlndXJlUGFzc2tleVBsdWdpbihwbHVnaW46IGFueSkge1xuICBwbHVnaW4uc2NoZW1hID0gcGx1Z2luPy5zY2hlbWEgPz8ge31cbiAgcGx1Z2luLnNjaGVtYS5wYXNza2V5ID0ge1xuICAgIC4uLihwbHVnaW4/LnNjaGVtYT8ucGFzc2tleSA/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lugs } from "
|
|
1
|
+
import { betterAuthPluginSlugs } from "../../constants";
|
|
2
2
|
export function configureSsoPlugin(plugin) {
|
|
3
3
|
plugin.schema = plugin?.schema ?? {};
|
|
4
4
|
plugin.schema.sso = {
|
|
@@ -8,10 +8,10 @@ export function configureSsoPlugin(plugin) {
|
|
|
8
8
|
...plugin?.schema?.sso?.fields ?? {},
|
|
9
9
|
userId: {
|
|
10
10
|
...plugin?.schema?.sso?.fields?.userId ?? {},
|
|
11
|
-
fieldName:
|
|
11
|
+
fieldName: 'user'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vbGliL3Nhbml0aXplLWJldHRlci1hdXRoLW9wdGlvbnMvc3NvLXBsdWdpbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBiZXR0ZXJBdXRoUGx1Z2luU2x1Z3MgfSBmcm9tICdAL2JldHRlci1hdXRoL3BsdWdpbi9jb25zdGFudHMnXG5cbmV4cG9ydCBmdW5jdGlvbiBjb25maWd1cmVTc29QbHVnaW4ocGx1Z2luOiBhbnkpIHtcbiAgcGx1Z2luLnNjaGVtYSA9IHBsdWdpbj8uc2NoZW1hID8/IHt9XG4gIHBsdWdpbi5zY2hlbWEuc3NvID0ge1xuICAgIC4uLihwbHVnaW4/LnNjaGVtYT8uc3NvID8/IHt9KSxcbiAgICBtb2RlbE5hbWU6IGJldHRlckF1dGhQbHVnaW5TbHVncy5zc29Qcm92aWRlcnMsXG4gICAgZmllbGRzOiB7XG4gICAgICAuLi4ocGx1Z2luPy5zY2hlbWE/LnNzbz8uZmllbGRzID8/IHt9KSxcbiAgICAgIHVzZXJJZDoge1xuICAgICAgICAuLi4ocGx1Z2luPy5zY2hlbWE/LnNzbz8uZmllbGRzPy51c2VySWQgPz8ge30pLFxuICAgICAgICBmaWVsZE5hbWU6ICd1c2VyJ1xuICAgICAgfVxuICAgIH1cbiAgfVxufVxuIl0sIm5hbWVzIjpbImJldHRlckF1dGhQbHVnaW5TbHVncyIsImNvbmZpZ3VyZVNzb1BsdWdpbiIsInBsdWdpbiIsInNjaGVtYSIsInNzbyIsIm1vZGVsTmFtZSIsInNzb1Byb3ZpZGVycyIsImZpZWxkcyIsInVzZXJJZCIsImZpZWxkTmFtZSJdLCJtYXBwaW5ncyI6IkFBQUEsU0FBU0EscUJBQXFCLFFBQVEsa0JBQWdDO0FBRXRFLE9BQU8sU0FBU0MsbUJBQW1CQyxNQUFXO0lBQzVDQSxPQUFPQyxNQUFNLEdBQUdELFFBQVFDLFVBQVUsQ0FBQztJQUNuQ0QsT0FBT0MsTUFBTSxDQUFDQyxHQUFHLEdBQUc7UUFDbEIsR0FBSUYsUUFBUUMsUUFBUUMsT0FBTyxDQUFDLENBQUM7UUFDN0JDLFdBQVdMLHNCQUFzQk0sWUFBWTtRQUM3Q0MsUUFBUTtZQUNOLEdBQUlMLFFBQVFDLFFBQVFDLEtBQUtHLFVBQVUsQ0FBQyxDQUFDO1lBQ3JDQyxRQUFRO2dCQUNOLEdBQUlOLFFBQVFDLFFBQVFDLEtBQUtHLFFBQVFDLFVBQVUsQ0FBQyxDQUFDO2dCQUM3Q0MsV0FBVztZQUNiO1FBQ0Y7SUFDRjtBQUNGIn0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SanitizedBetterAuthOptions } from
|
|
1
|
+
import type { SanitizedBetterAuthOptions } from '@/better-auth/plugin/types';
|
|
2
2
|
/**
|
|
3
3
|
* Adds a before hook to the user create operation to ensure the password is set.
|
|
4
4
|
* This is necessary because the password is not set in the user create operation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-password-set-before-create.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ensure-password-set-before-create.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAA;AAE5E;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,0BAA0B,QAoBpF"}
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
* This is necessary because the password is not set in the user create operation
|
|
4
4
|
* and is instead set in the sync password accounts hook.
|
|
5
5
|
*/ export function ensurePasswordSetBeforeUserCreate(options) {
|
|
6
|
-
if (typeof options.databaseHooks !==
|
|
7
|
-
if (typeof options.databaseHooks.user !==
|
|
8
|
-
if (typeof options.databaseHooks.user.create !==
|
|
6
|
+
if (typeof options.databaseHooks !== 'object') options.databaseHooks = {};
|
|
7
|
+
if (typeof options.databaseHooks.user !== 'object') options.databaseHooks.user = {};
|
|
8
|
+
if (typeof options.databaseHooks.user.create !== 'object') options.databaseHooks.user.create = {};
|
|
9
9
|
const initialBeforeUserCreateHook = options.databaseHooks.user.create.before ?? null;
|
|
10
10
|
options.databaseHooks.user.create.before = async (user, ctx)=>{
|
|
11
11
|
if (!user.password) {
|
|
12
|
-
|
|
12
|
+
;
|
|
13
|
+
user.password = ctx?.body?.password ?? Array(3).fill(0).map(()=>Math.random().toString(36).slice(2)).join('');
|
|
13
14
|
}
|
|
14
|
-
if (typeof initialBeforeUserCreateHook ===
|
|
15
|
+
if (typeof initialBeforeUserCreateHook === 'function') {
|
|
15
16
|
return initialBeforeUserCreateHook(user, ctx);
|
|
16
17
|
}
|
|
17
18
|
return {
|
|
@@ -20,4 +21,4 @@
|
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vbGliL3Nhbml0aXplLWJldHRlci1hdXRoLW9wdGlvbnMvdXRpbHMvZW5zdXJlLXBhc3N3b3JkLXNldC1iZWZvcmUtY3JlYXRlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgU2FuaXRpemVkQmV0dGVyQXV0aE9wdGlvbnMgfSBmcm9tICdAL2JldHRlci1hdXRoL3BsdWdpbi90eXBlcydcblxuLyoqXG4gKiBBZGRzIGEgYmVmb3JlIGhvb2sgdG8gdGhlIHVzZXIgY3JlYXRlIG9wZXJhdGlvbiB0byBlbnN1cmUgdGhlIHBhc3N3b3JkIGlzIHNldC5cbiAqIFRoaXMgaXMgbmVjZXNzYXJ5IGJlY2F1c2UgdGhlIHBhc3N3b3JkIGlzIG5vdCBzZXQgaW4gdGhlIHVzZXIgY3JlYXRlIG9wZXJhdGlvblxuICogYW5kIGlzIGluc3RlYWQgc2V0IGluIHRoZSBzeW5jIHBhc3N3b3JkIGFjY291bnRzIGhvb2suXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBlbnN1cmVQYXNzd29yZFNldEJlZm9yZVVzZXJDcmVhdGUob3B0aW9uczogU2FuaXRpemVkQmV0dGVyQXV0aE9wdGlvbnMpIHtcbiAgaWYgKHR5cGVvZiBvcHRpb25zLmRhdGFiYXNlSG9va3MgIT09ICdvYmplY3QnKSBvcHRpb25zLmRhdGFiYXNlSG9va3MgPSB7fVxuICBpZiAodHlwZW9mIG9wdGlvbnMuZGF0YWJhc2VIb29rcy51c2VyICE9PSAnb2JqZWN0Jykgb3B0aW9ucy5kYXRhYmFzZUhvb2tzLnVzZXIgPSB7fVxuICBpZiAodHl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
@@ -18,7 +18,7 @@ export declare const hashPassword: (password: string) => Promise<string>;
|
|
|
18
18
|
* @param params Object containing the hash and password
|
|
19
19
|
* @returns Boolean indicating if the password matches
|
|
20
20
|
*/
|
|
21
|
-
export declare const verifyPassword: ({ hash, password, salt
|
|
21
|
+
export declare const verifyPassword: ({ hash, password, salt }: {
|
|
22
22
|
hash: string;
|
|
23
23
|
password: string;
|
|
24
24
|
salt?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.ts"],"names":[],"mappings":"AAqBA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAQnE,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAU,0BAA0B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,CAAC,OAAO,CAyBjI,CAAA"}
|
|
@@ -5,7 +5,7 @@ import crypto from "crypto";
|
|
|
5
5
|
* This generates a hash compatible with Payload's internal auth system
|
|
6
6
|
* so that passwords set via better-auth can be used with Payload admin panel
|
|
7
7
|
*/ function pbkdf2Promisified(password, salt) {
|
|
8
|
-
return new Promise((resolve, reject)=>crypto.pbkdf2(password, salt, 25000, 512,
|
|
8
|
+
return new Promise((resolve, reject)=>crypto.pbkdf2(password, salt, 25000, 512, 'sha256', (err, hashRaw)=>err ? reject(err) : resolve(hashRaw)));
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Generates random bytes for the salt
|
|
@@ -22,9 +22,9 @@ import crypto from "crypto";
|
|
|
22
22
|
* @returns A string in the format {salt}:{hash}
|
|
23
23
|
*/ export const hashPassword = async (password)=>{
|
|
24
24
|
const saltBuffer = await randomBytes();
|
|
25
|
-
const salt = saltBuffer.toString(
|
|
25
|
+
const salt = saltBuffer.toString('hex');
|
|
26
26
|
const hashRaw = await pbkdf2Promisified(password, salt);
|
|
27
|
-
const hash = hashRaw.toString(
|
|
27
|
+
const hash = hashRaw.toString('hex');
|
|
28
28
|
return `${salt}:${hash}`;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
@@ -45,18 +45,19 @@ import crypto from "crypto";
|
|
|
45
45
|
storedHash = hash;
|
|
46
46
|
} else {
|
|
47
47
|
// Otherwise, split the combined format (from account.password)
|
|
48
|
-
const parts = hash.split(
|
|
48
|
+
const parts = hash.split(':');
|
|
49
49
|
if (parts.length !== 2) {
|
|
50
50
|
return false;
|
|
51
51
|
}
|
|
52
|
+
;
|
|
52
53
|
[saltValue, storedHash] = parts;
|
|
53
54
|
}
|
|
54
55
|
if (!saltValue || !storedHash) {
|
|
55
56
|
return false;
|
|
56
57
|
}
|
|
57
58
|
const hashRaw = await pbkdf2Promisified(password, saltValue);
|
|
58
|
-
const computedHash = hashRaw.toString(
|
|
59
|
+
const computedHash = hashRaw.toString('hex');
|
|
59
60
|
return storedHash === computedHash;
|
|
60
61
|
};
|
|
61
62
|
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vbGliL3Nhbml0aXplLWJldHRlci1hdXRoLW9wdGlvbnMvdXRpbHMvcGFzc3dvcmQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNyeXB0byBmcm9tICdjcnlwdG8nXG5cbi8qKlxuICogTWltaWNzIFBheWxvYWQncyBpbnRlcm5hbCBwYXNzd29yZCBoY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NQUFNO0FBQzFCLEVBQUM7QUFFRDs7Ozs7Ozs7O0NBU0MsR0FDRCxPQUFPLE1BQU1DLGlCQUFpQixPQUFPLEVBQUVELElBQUksRUFBRVosUUFBUSxFQUFFQyxJQUFJLEVBQXFEO0lBQzlHLElBQUlhO0lBQ0osSUFBSUM7SUFFSiwwRUFBMEU7SUFDMUUsSUFBSWQsTUFBTTtRQUNSYSxZQUFZYjtRQUNaYyxhQUFhSDtJQUNmLE9BQU87UUFDTCwrREFBK0Q7UUFDL0QsTUFBTUksUUFBUUosS0FBS0ssS0FBSyxDQUFDO1FBQ3pCLElBQUlELE1BQU1FLE1BQU0sS0FBSyxHQUFHO1lBQ3RCLE9BQU87UUFDVDs7UUFDQyxDQUFDSixXQUFXQyxXQUFXLEdBQUdDO0lBQzdCO0lBRUEsSUFBSSxDQUFDRixhQUFhLENBQUNDLFlBQVk7UUFDN0IsT0FBTztJQUNUO0lBRUEsTUFBTVIsVUFBVSxNQUFNUixrQkFBa0JDLFVBQVVjO0lBQ2xELE1BQU1LLGVBQWVaLFFBQVFJLFFBQVEsQ0FBQztJQUV0QyxPQUFPSSxlQUFlSTtBQUN4QixFQUFDIn0=
|
package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Config, Payload } from 'payload';
|
|
2
|
+
import type { SanitizedBetterAuthOptions, BetterAuthPluginOptions } from '@/better-auth/plugin/types';
|
|
3
3
|
/**
|
|
4
4
|
* Sets up a middleware that enforces the saveToJwt configuration when setting session data.
|
|
5
5
|
* This ensures that only fields specified in saveToJwt are included in the cookie cache
|
|
@@ -8,9 +8,9 @@ import type { Config, Payload } from "payload";
|
|
|
8
8
|
* The middleware runs after authentication and filters the session data based on
|
|
9
9
|
* the collection configurations before storing it in the cookie cache.
|
|
10
10
|
*/
|
|
11
|
-
export declare function saveToJwtMiddleware({ sanitizedOptions, payloadConfig, pluginOptions
|
|
11
|
+
export declare function saveToJwtMiddleware({ sanitizedOptions, payloadConfig, pluginOptions }: {
|
|
12
12
|
sanitizedOptions: SanitizedBetterAuthOptions;
|
|
13
|
-
payloadConfig: Payload[
|
|
13
|
+
payloadConfig: Payload['config'] | Config | Promise<Payload['config'] | Config>;
|
|
14
14
|
pluginOptions: BetterAuthPluginOptions;
|
|
15
15
|
}): void;
|
|
16
16
|
//# sourceMappingURL=save-to-jwt-middleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-to-jwt-middleware.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"save-to-jwt-middleware.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAErG;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,gBAAgB,EAChB,aAAa,EACb,aAAa,EACd,EAAE;IACD,gBAAgB,EAAE,0BAA0B,CAAA;IAC5C,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAA;IAC/E,aAAa,EAAE,uBAAuB,CAAA;CACvC,QAoBA"}
|
package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.js
CHANGED
|
@@ -9,7 +9,7 @@ import { prepareSessionData } from "../../../helpers/prepare-session-data";
|
|
|
9
9
|
* The middleware runs after authentication and filters the session data based on
|
|
10
10
|
* the collection configurations before storing it in the cookie cache.
|
|
11
11
|
*/ export function saveToJwtMiddleware({ sanitizedOptions, payloadConfig, pluginOptions }) {
|
|
12
|
-
if (typeof sanitizedOptions.hooks !==
|
|
12
|
+
if (typeof sanitizedOptions.hooks !== 'object') sanitizedOptions.hooks = {};
|
|
13
13
|
sanitizedOptions.hooks.after = createAuthMiddleware(async (ctx)=>{
|
|
14
14
|
const newSession = ctx.context?.session ?? ctx.context?.newSession;
|
|
15
15
|
if (!newSession) return;
|
|
@@ -17,8 +17,8 @@ import { prepareSessionData } from "../../../helpers/prepare-session-data";
|
|
|
17
17
|
newSession,
|
|
18
18
|
payloadConfig,
|
|
19
19
|
collectionSlugs: {
|
|
20
|
-
userCollectionSlug: pluginOptions.users?.slug ??
|
|
21
|
-
sessionCollectionSlug: pluginOptions.sessions?.slug ??
|
|
20
|
+
userCollectionSlug: pluginOptions.users?.slug ?? 'users',
|
|
21
|
+
sessionCollectionSlug: pluginOptions.sessions?.slug ?? 'sessions'
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
if (filteredSessionData) {
|
|
@@ -27,4 +27,4 @@ import { prepareSessionData } from "../../../helpers/prepare-session-data";
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vbGliL3Nhbml0aXplLWJldHRlci1hdXRoLW9wdGlvbnMvdXRpbHMvc2F2ZS10by1qd3QtbWlkZGxld2FyZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXRDb29raWVDYWNoZSB9IGZyb20gJ2JldHRlci1hdXRoL2Nvb2tpZXMnXG5pbXBvcnQgeyBjcmVhdGVBdXRoTWlkZGxld2FyZSB9IGZyb20gJ2JldHRlci1hd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QWNhLFFBQVEsRUFBRUYsUUFBUTtZQUN6RDtRQUNGO1FBRUEsSUFBSUoscUJBQXFCO1lBQ3ZCLE1BQU1iLGVBQWVTLEtBQUtJO1FBQzVCO0lBQ0Y7QUFDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/components/admin-buttons/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/components/admin-buttons/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAMhD,OAAO,cAAc,CAAA;AAErB,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoG7C,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Button, toast, useDocumentInfo, useFormFields } from "@payloadcms/ui";
|
|
4
|
-
import { adminClient } from "better-auth/client/plugins";
|
|
5
|
-
import { createAuthClient } from "better-auth/react";
|
|
6
|
-
import { useRouter } from "next/navigation";
|
|
7
3
|
import React, { Fragment, useMemo } from "react";
|
|
4
|
+
import { useRouter } from "next/navigation";
|
|
5
|
+
import { createAuthClient } from "better-auth/react";
|
|
6
|
+
import { adminClient } from "better-auth/client/plugins";
|
|
7
|
+
import { Button, toast, useDocumentInfo, useFormFields } from "@payloadcms/ui";
|
|
8
8
|
import "./index.scss";
|
|
9
9
|
const AdminButtons = ()=>{
|
|
10
10
|
const router = useRouter();
|
|
@@ -23,11 +23,11 @@ const AdminButtons = ()=>{
|
|
|
23
23
|
userId: String(id),
|
|
24
24
|
fetchOptions: {
|
|
25
25
|
onSuccess () {
|
|
26
|
-
router.push(
|
|
26
|
+
router.push('/');
|
|
27
27
|
},
|
|
28
28
|
onError (error) {
|
|
29
|
-
console.error(
|
|
30
|
-
toast.error(
|
|
29
|
+
console.error('Error impersonating user:', error);
|
|
30
|
+
toast.error('Failed to impersonate user');
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
});
|
|
@@ -37,12 +37,12 @@ const AdminButtons = ()=>{
|
|
|
37
37
|
userId: String(id),
|
|
38
38
|
fetchOptions: {
|
|
39
39
|
onSuccess () {
|
|
40
|
-
toast.success(
|
|
40
|
+
toast.success('User banned successfully');
|
|
41
41
|
router.refresh();
|
|
42
42
|
},
|
|
43
43
|
onError (error) {
|
|
44
|
-
console.error(
|
|
45
|
-
toast.error(
|
|
44
|
+
console.error('Error banning user:', error);
|
|
45
|
+
toast.error('Failed to ban user');
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -52,12 +52,12 @@ const AdminButtons = ()=>{
|
|
|
52
52
|
userId: String(id),
|
|
53
53
|
fetchOptions: {
|
|
54
54
|
onSuccess () {
|
|
55
|
-
toast.success(
|
|
55
|
+
toast.success('User unbanned successfully');
|
|
56
56
|
router.refresh();
|
|
57
57
|
},
|
|
58
58
|
onError (error) {
|
|
59
|
-
console.error(
|
|
60
|
-
toast.error(
|
|
59
|
+
console.error('Error unbanning user:', error);
|
|
60
|
+
toast.error('Failed to unban user');
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
});
|
|
@@ -67,12 +67,12 @@ const AdminButtons = ()=>{
|
|
|
67
67
|
userId: String(id),
|
|
68
68
|
fetchOptions: {
|
|
69
69
|
onSuccess () {
|
|
70
|
-
toast.success(
|
|
70
|
+
toast.success('All sessions revoked successfully');
|
|
71
71
|
router.refresh();
|
|
72
72
|
},
|
|
73
73
|
onError (error) {
|
|
74
|
-
console.error(
|
|
75
|
-
toast.error(
|
|
74
|
+
console.error('Error revoking all sessions:', error);
|
|
75
|
+
toast.error('Failed to revoke all sessions');
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
});
|
|
@@ -112,4 +112,4 @@ const AdminButtons = ()=>{
|
|
|
112
112
|
};
|
|
113
113
|
export default AdminButtons;
|
|
114
114
|
|
|
115
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
115
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vcGF5bG9hZC9jb21wb25lbnRzL2FkbWluLWJ1dHRvbnMvaW5kZXgudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50J1xuXG5pbXBvcnQgUmVhY3QsIHsgRnJhZ21lbnQsIHVzZU1lbW8gfSBmcm9tICdyZWFjdCdcbmltcG9ydCB7IHVzZVJvdXRlciB9IGZyb20gJ25leHQvbmF2aWdhdGlvbidcbmltcG9ydCB7IGNyZWF0ZUF1dGhDbGllbnQgfSBmcm9tICdiZXR0ZXItYXV0aC9yZWFjdCdcbmltcG9ydCB7IGFkbWluQ2xpZW50IH0gZnJvbSAnYmV0dGVyLWF1dGgvY2xpZW50L3BsdWdpbnMnXG5pbXBvcnQgeyBCdXR0b24sIHRvYXN0LCB1c2VEb2N1bWVudEluZm8sIHVzZUZvcm1GaWVsZHMgfSBmcm9tICdAcGF5bG9hZGNtcy91aSdcblxuaW1wb3J0ICcuL2luZGV4LnNjc3MnXG5cbnR5cGUgQWRtaW5CdXR0b25zUHJvcHMgPSB7XG4gIHVzZXJTbHVnOiBzdHJpbmdcbn1cblxuY29uc3QgQWRtaW5CdXR0b25zOiBSZWFjdC5GQzxBZG1pbkJ1dHRvbnNQcm9wcz4gPSAoKSA9PiB7XG4gIGNvbnN0IHJvdXRlciA9IHVzZVJvdXRlcigpXG4gIGNvbnN0IHsgaWQgfSA9IHVzZURvY3VtZW50SW5mbyg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QixTQUFTSjtnQkFBYUssYUFBWTtnQkFBVUMsV0FBVTtnQkFBZUMsTUFBSzswQkFBUztpQkFHekY7OztBQUdWO0FBRUEsZUFBZTlCLGFBQVkifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/components/admin-invite-button/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/components/admin-invite-button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,cAAc,CAAA;AAIrB,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC1C,CAAA;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkKvD,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|