payload-auth 1.8.0-canary.1 → 1.8.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/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 +51 -54
- 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.d.ts +1 -1
- package/dist/better-auth/adapter/generate-schema/index.d.ts.map +1 -1
- package/dist/better-auth/adapter/generate-schema/index.js +4 -4
- package/dist/better-auth/adapter/generate-schema/utils.js +4 -4
- 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 +59 -59
- package/dist/better-auth/adapter/transform/index.d.ts +3 -3
- package/dist/better-auth/adapter/transform/index.d.ts.map +1 -1
- package/dist/better-auth/adapter/transform/index.js +86 -61
- package/dist/better-auth/adapter/types.d.ts +4 -4
- package/dist/better-auth/adapter/types.d.ts.map +1 -1
- package/dist/better-auth/adapter/types.js +1 -1
- package/dist/better-auth/generated-types.d.ts +27 -1
- package/dist/better-auth/generated-types.d.ts.map +1 -1
- package/dist/better-auth/generated-types.js +1 -1
- package/dist/better-auth/index.d.ts +3 -3
- package/dist/better-auth/index.d.ts.map +1 -1
- package/dist/better-auth/index.js +1 -1
- package/dist/better-auth/plugin/constants.d.ts +10 -0
- package/dist/better-auth/plugin/constants.d.ts.map +1 -1
- package/dist/better-auth/plugin/constants.js +163 -153
- package/dist/better-auth/plugin/helpers/check-plugin-exists.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/check-plugin-exists.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/check-plugin-exists.js +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 +2 -2
- 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 +2 -2
- 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-better-auth-schema.d.ts +2 -2
- package/dist/better-auth/plugin/helpers/get-better-auth-schema.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-better-auth-schema.js +3 -3
- package/dist/better-auth/plugin/helpers/get-collection-slug.d.ts +2 -2
- package/dist/better-auth/plugin/helpers/get-collection-slug.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-collection-slug.js +7 -7
- package/dist/better-auth/plugin/helpers/get-collection.d.ts +2 -2
- package/dist/better-auth/plugin/helpers/get-collection.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-collection.js +1 -1
- 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-signed-cookie.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/get-signed-cookie.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-signed-cookie.js +13 -13
- 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 +2 -2
- package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/prepare-session-data.js +2 -2
- package/dist/better-auth/plugin/helpers/sync-resolved-schema-with-collection-map.d.ts +2 -2
- package/dist/better-auth/plugin/helpers/sync-resolved-schema-with-collection-map.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/sync-resolved-schema-with-collection-map.js +1 -1
- package/dist/better-auth/plugin/index.d.ts +7 -11
- package/dist/better-auth/plugin/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/index.js +3 -26
- package/dist/better-auth/plugin/lib/apply-disabled-default-auth-config.d.ts +3 -3
- package/dist/better-auth/plugin/lib/apply-disabled-default-auth-config.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/apply-disabled-default-auth-config.js +9 -9
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.d.ts +2 -2
- 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 +2 -2
- 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 +19 -20
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts +2 -2
- 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 +21 -21
- package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts +2 -2
- 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 +26 -26
- package/dist/better-auth/plugin/lib/build-collections/device-code.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/device-code.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/device-code.js +6 -6
- 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 +10 -4
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/invitations.js +14 -14
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/jwks.js +8 -8
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/members.js +11 -12
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts +2 -2
- 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 +15 -15
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts +2 -2
- 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 +16 -16
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts +2 -2
- 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 +11 -12
- package/dist/better-auth/plugin/lib/build-collections/organization-roles.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/organization-roles.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/organization-roles.js +65 -0
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/organizations.js +61 -13
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/passkeys.js +15 -16
- package/dist/better-auth/plugin/lib/build-collections/rate-limit.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/rate-limit.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/rate-limit.js +54 -0
- package/dist/better-auth/plugin/lib/build-collections/scim-provider.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/scim-provider.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/scim-provider.js +65 -0
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/sessions.js +21 -22
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts +2 -2
- 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 +12 -13
- package/dist/better-auth/plugin/lib/build-collections/subscriptions.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/subscriptions.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/subscriptions.js +17 -18
- package/dist/better-auth/plugin/lib/build-collections/team-members.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/team-members.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/team-members.js +14 -9
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/teams.js +9 -9
- package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts +2 -2
- 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 +9 -9
- 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 +4 -4
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts +5 -5
- 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 +9 -9
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/index.d.ts +4 -4
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/index.js +1 -1
- 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 +17 -17
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts +3 -3
- 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 +7 -7
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts +3 -3
- 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 +7 -7
- 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 +10 -11
- 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 +9 -9
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts +1 -1
- 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 +3 -3
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.d.ts +2 -2
- 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 +2 -2
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/index.d.ts +6 -6
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/index.js +1 -1
- 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 +12 -12
- package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts +2 -2
- 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 +38 -38
- package/dist/better-auth/plugin/lib/build-collections/utils/collection-schema.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/utils/collection-schema.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/collection-schema.js +3 -3
- package/dist/better-auth/plugin/lib/build-collections/utils/filter-properties.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/utils/filter-properties.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/filter-properties.js +53 -53
- 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/model-field-transformations.d.ts +3 -3
- package/dist/better-auth/plugin/lib/build-collections/utils/model-field-transformations.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/model-field-transformations.js +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.d.ts +1 -2
- 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 +12 -12
- package/dist/better-auth/plugin/lib/build-collections/utils/transform-schema-fields-to-payload.d.ts +4 -4
- package/dist/better-auth/plugin/lib/build-collections/utils/transform-schema-fields-to-payload.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/transform-schema-fields-to-payload.js +17 -17
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts +2 -2
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/build-collections/verifications.js +10 -10
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts +3 -3
- 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/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 +2 -2
- 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 +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.js +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/device-authorization-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/device-authorization-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/device-authorization-plugin.js +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts +4 -5
- 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 +11 -11
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.js +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.js +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.js +2 -2
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.js +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/two-factor-plugin.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/two-factor-plugin.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/two-factor-plugin.js +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/admin-after-role-middleware.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/admin-after-role-middleware.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/admin-after-role-middleware.js +6 -6
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/admin-before-role-middleware.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/admin-before-role-middleware.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/admin-before-role-middleware.js +6 -6
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/apply-save-to-jwt-returned.d.ts +3 -3
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/apply-save-to-jwt-returned.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/apply-save-to-jwt-returned.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 +6 -7
- 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 +6 -7
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/require-admin-invite-for-sign-up-middleware.d.ts +3 -3
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/require-admin-invite-for-sign-up-middleware.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/require-admin-invite-for-sign-up-middleware.js +9 -10
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/use-admin-invite-after-email-sign-up-middleware.d.ts +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/use-admin-invite-after-email-sign-up-middleware.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/use-admin-invite-after-email-sign-up-middleware.js +12 -12
- package/dist/better-auth/plugin/lib/set-login-methods.d.ts +3 -3
- package/dist/better-auth/plugin/lib/set-login-methods.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/set-login-methods.js +4 -5
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts +5 -5
- 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 +20 -20
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.scss +6 -1
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts +5 -5
- 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 +30 -30
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.scss +6 -2
- package/dist/better-auth/plugin/payload/components/login-form/alternative-methods.d.ts +3 -3
- package/dist/better-auth/plugin/payload/components/login-form/alternative-methods.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/login-form/alternative-methods.js +32 -32
- package/dist/better-auth/plugin/payload/components/login-form/context.d.ts +9 -9
- package/dist/better-auth/plugin/payload/components/login-form/context.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/login-form/context.js +18 -18
- package/dist/better-auth/plugin/payload/components/login-form/credentials-form.d.ts +3 -3
- package/dist/better-auth/plugin/payload/components/login-form/credentials-form.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/login-form/credentials-form.js +32 -32
- package/dist/better-auth/plugin/payload/components/login-form/index.d.ts +4 -3
- package/dist/better-auth/plugin/payload/components/login-form/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/login-form/index.js +3 -3
- package/dist/better-auth/plugin/payload/components/login-form/index.scss +1 -2
- 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 -7
- package/dist/better-auth/plugin/payload/components/passkeys/add-button.d.ts +2 -2
- package/dist/better-auth/plugin/payload/components/passkeys/add-button.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/passkeys/add-button.js +17 -17
- package/dist/better-auth/plugin/payload/components/passkeys/client.d.ts +2 -3
- package/dist/better-auth/plugin/payload/components/passkeys/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/passkeys/client.js +9 -9
- package/dist/better-auth/plugin/payload/components/passkeys/index.d.ts +4 -4
- package/dist/better-auth/plugin/payload/components/passkeys/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/passkeys/index.js +4 -4
- package/dist/better-auth/plugin/payload/components/passkeys/index.scss +8 -1
- package/dist/better-auth/plugin/payload/components/passkeys/list.d.ts +3 -3
- package/dist/better-auth/plugin/payload/components/passkeys/list.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/passkeys/list.js +12 -12
- package/dist/better-auth/plugin/payload/components/passkeys/types.d.ts +8 -8
- package/dist/better-auth/plugin/payload/components/passkeys/types.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/passkeys/types.js +1 -1
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts +1 -2
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/rsc-redirect.js +5 -5
- package/dist/better-auth/plugin/payload/components/token-field.d.ts +2 -3
- package/dist/better-auth/plugin/payload/components/token-field.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/token-field.js +5 -6
- package/dist/better-auth/plugin/payload/components/two-factor-auth/index.d.ts +5 -5
- package/dist/better-auth/plugin/payload/components/two-factor-auth/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/two-factor-auth/index.js +41 -40
- package/dist/better-auth/plugin/payload/components/two-factor-auth/index.scss +6 -3
- package/dist/better-auth/plugin/payload/exports/client.d.ts +6 -7
- package/dist/better-auth/plugin/payload/exports/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/exports/client.js +3 -4
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts +8 -8
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/exports/rsc.js +5 -5
- 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 +2 -2
- 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 +10 -11
- package/dist/better-auth/plugin/payload/views/admin-login/client.d.ts +5 -6
- package/dist/better-auth/plugin/payload/views/admin-login/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/admin-login/client.js +6 -7
- package/dist/better-auth/plugin/payload/views/admin-login/index.d.ts +5 -5
- package/dist/better-auth/plugin/payload/views/admin-login/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/admin-login/index.js +21 -21
- package/dist/better-auth/plugin/payload/views/admin-signup/client.d.ts +7 -7
- package/dist/better-auth/plugin/payload/views/admin-signup/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/admin-signup/client.js +29 -29
- package/dist/better-auth/plugin/payload/views/admin-signup/index.d.ts +5 -5
- package/dist/better-auth/plugin/payload/views/admin-signup/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/admin-signup/index.js +14 -14
- package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts +3 -4
- 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 +22 -22
- package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts +7 -7
- 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 +10 -10
- package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts +4 -4
- 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 +22 -22
- package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts +7 -7
- 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 +12 -12
- package/dist/better-auth/plugin/payload/views/two-factor-verify/client.d.ts +4 -2
- package/dist/better-auth/plugin/payload/views/two-factor-verify/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/two-factor-verify/client.js +17 -17
- package/dist/better-auth/plugin/payload/views/two-factor-verify/index.d.ts +5 -5
- package/dist/better-auth/plugin/payload/views/two-factor-verify/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/two-factor-verify/index.js +10 -10
- package/dist/better-auth/plugin/types.d.ts +28 -30
- package/dist/better-auth/plugin/types.d.ts.map +1 -1
- package/dist/better-auth/plugin/types.js +1 -1
- package/dist/better-auth/plugin/utils/set.d.ts.map +1 -1
- package/dist/better-auth/plugin/utils/set.js +4 -4
- package/dist/better-auth/scripts/generate-types.js +58 -61
- package/dist/better-auth/types.d.ts +2 -2
- package/dist/better-auth/types.d.ts.map +1 -1
- package/dist/better-auth/types.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/shared/components/icons.d.ts +2 -3
- package/dist/shared/components/icons.d.ts.map +1 -1
- package/dist/shared/components/icons.js +17 -18
- package/dist/shared/components/logo.d.ts +2 -3
- package/dist/shared/components/logo.d.ts.map +1 -1
- package/dist/shared/components/logo.js +3 -3
- package/dist/shared/form/components/submit.d.ts +1 -1
- package/dist/shared/form/components/submit.d.ts.map +1 -1
- package/dist/shared/form/components/submit.js +2 -2
- package/dist/shared/form/fields/text-field.d.ts.map +1 -1
- package/dist/shared/form/fields/text-field.js +2 -2
- package/dist/shared/form/index.d.ts +13 -19
- package/dist/shared/form/index.d.ts.map +1 -1
- package/dist/shared/form/index.js +4 -4
- package/dist/shared/form/ui/header/index.d.ts +6 -6
- package/dist/shared/form/ui/header/index.d.ts.map +1 -1
- package/dist/shared/form/ui/header/index.js +4 -5
- package/dist/shared/form/ui/header/index.scss +1 -1
- package/dist/shared/form/ui/index.d.ts +26 -23
- package/dist/shared/form/ui/index.d.ts.map +1 -1
- package/dist/shared/form/ui/index.js +33 -20
- package/dist/shared/form/validation.d.ts +1 -1
- package/dist/shared/form/validation.d.ts.map +1 -1
- package/dist/shared/form/validation.js +27 -22
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/payload/fields/field-copy-button/index.css +2 -2
- package/dist/shared/payload/fields/field-copy-button/index.d.ts +2 -2
- package/dist/shared/payload/fields/field-copy-button/index.d.ts.map +1 -1
- package/dist/shared/payload/fields/field-copy-button/index.js +2 -2
- package/dist/shared/payload/fields/generate-uuid-button/index.d.ts +2 -2
- package/dist/shared/payload/fields/generate-uuid-button/index.d.ts.map +1 -1
- package/dist/shared/payload/fields/generate-uuid-button/index.js +2 -2
- package/dist/shared/payload/fields/index.d.ts +2 -2
- package/dist/shared/payload/fields/index.d.ts.map +1 -1
- package/dist/shared/payload/fields/index.js +1 -1
- package/dist/shared/utils/regex.d.ts.map +1 -1
- package/dist/shared/utils/regex.js +1 -1
- package/dist/shared/utils/try-catch.d.ts.map +1 -1
- package/dist/shared/utils/try-catch.js +1 -1
- package/dist/shared/utils/value-or-default.d.ts.map +1 -1
- package/dist/shared/utils/value-or-default.js +2 -2
- package/package.json +28 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/forgot-password/client.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/forgot-password/client.tsx"],"names":[],"mappings":"AAYA,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,EACT,EAAE,uBAAuB,+BAqGzB"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { toast, useConfig, useTranslation } from "@payloadcms/ui";
|
|
3
4
|
import { createAuthClient } from "better-auth/react";
|
|
4
5
|
import { useMemo, useState } from "react";
|
|
6
|
+
import { z } from "zod";
|
|
5
7
|
import { adminRoutes } from "../../../constants";
|
|
6
8
|
import { useAppForm } from "../../../../../shared/form";
|
|
7
9
|
import { Form, FormInputWrap } from "../../../../../shared/form/ui";
|
|
8
10
|
import { FormHeader } from "../../../../../shared/form/ui/header";
|
|
9
11
|
import { emailRegex } from "../../../../../shared/utils/regex";
|
|
10
|
-
|
|
11
|
-
import { z } from "zod";
|
|
12
|
-
export const ForgotPasswordForm = ({ baseURL, basePath })=>{
|
|
12
|
+
export function ForgotPasswordForm({ baseURL, basePath }) {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const { config } = useConfig();
|
|
15
15
|
const adminRoute = config.routes.admin;
|
|
@@ -22,22 +22,22 @@ export const ForgotPasswordForm = ({ baseURL, basePath })=>{
|
|
|
22
22
|
email: z.string().superRefine((val, ctx)=>{
|
|
23
23
|
if (!val) {
|
|
24
24
|
ctx.addIssue({
|
|
25
|
-
code:
|
|
26
|
-
message: t(
|
|
25
|
+
code: "custom",
|
|
26
|
+
message: t("validation:required") || "Required"
|
|
27
27
|
});
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
if (!emailRegex.test(val)) {
|
|
31
31
|
ctx.addIssue({
|
|
32
|
-
code:
|
|
33
|
-
message: t(
|
|
32
|
+
code: "custom",
|
|
33
|
+
message: t("authentication:emailNotValid") || "Invalid email"
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
})
|
|
37
37
|
});
|
|
38
38
|
const form = useAppForm({
|
|
39
39
|
defaultValues: {
|
|
40
|
-
email:
|
|
40
|
+
email: ""
|
|
41
41
|
},
|
|
42
42
|
onSubmit: async ({ value })=>{
|
|
43
43
|
const { email } = value;
|
|
@@ -47,17 +47,17 @@ export const ForgotPasswordForm = ({ baseURL, basePath })=>{
|
|
|
47
47
|
redirectTo: `${adminRoute}${adminRoutes.resetPassword}`
|
|
48
48
|
});
|
|
49
49
|
if (error) {
|
|
50
|
-
toast.error(error.message || t(
|
|
50
|
+
toast.error(error.message || t("authentication:emailNotValid") || "Error");
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
if (data?.status) {
|
|
54
54
|
setHasSubmitted(true);
|
|
55
|
-
toast.success(
|
|
55
|
+
toast.success("Successfully sent reset email.");
|
|
56
56
|
} else {
|
|
57
|
-
toast.error(t(
|
|
57
|
+
toast.error(t("general:error") || "Server Error");
|
|
58
58
|
}
|
|
59
59
|
} catch (e) {
|
|
60
|
-
toast.error(t(
|
|
60
|
+
toast.error(t("general:error") || "An unexpected error occurred");
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
validators: {
|
|
@@ -66,8 +66,8 @@ export const ForgotPasswordForm = ({ baseURL, basePath })=>{
|
|
|
66
66
|
});
|
|
67
67
|
if (hasSubmitted) {
|
|
68
68
|
return /*#__PURE__*/ _jsx(FormHeader, {
|
|
69
|
-
description: t(
|
|
70
|
-
heading: t(
|
|
69
|
+
description: t("authentication:checkYourEmailForPasswordReset"),
|
|
70
|
+
heading: t("authentication:emailSent")
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
return /*#__PURE__*/ _jsxs(Form, {
|
|
@@ -77,8 +77,8 @@ export const ForgotPasswordForm = ({ baseURL, basePath })=>{
|
|
|
77
77
|
},
|
|
78
78
|
children: [
|
|
79
79
|
/*#__PURE__*/ _jsx(FormHeader, {
|
|
80
|
-
heading: t(
|
|
81
|
-
description: t(
|
|
80
|
+
heading: t("authentication:forgotPassword"),
|
|
81
|
+
description: t("authentication:forgotPasswordEmailInstructions")
|
|
82
82
|
}),
|
|
83
83
|
/*#__PURE__*/ _jsx(FormInputWrap, {
|
|
84
84
|
children: /*#__PURE__*/ _jsx(form.AppField, {
|
|
@@ -87,18 +87,18 @@ export const ForgotPasswordForm = ({ baseURL, basePath })=>{
|
|
|
87
87
|
type: "text",
|
|
88
88
|
className: "email",
|
|
89
89
|
autoComplete: "email",
|
|
90
|
-
label: t(
|
|
90
|
+
label: t("general:email")
|
|
91
91
|
})
|
|
92
92
|
})
|
|
93
93
|
}),
|
|
94
94
|
/*#__PURE__*/ _jsx(form.AppForm, {
|
|
95
95
|
children: /*#__PURE__*/ _jsx(form.Submit, {
|
|
96
|
-
label: t(
|
|
97
|
-
loadingLabel: t(
|
|
96
|
+
label: t("general:submit"),
|
|
97
|
+
loadingLabel: t("general:loading")
|
|
98
98
|
})
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
101
|
});
|
|
102
|
-
}
|
|
102
|
+
}
|
|
103
103
|
|
|
104
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
104
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vcGF5bG9hZC92aWV3cy9mb3Jnb3QtcGFzc3dvcmQvY2xpZW50LnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBjbGllbnRcIjtcblxuaW1wb3J0IHsgdG9hc3QsIHVzZUNvbmZpZywgdXNlVHJhbnNsYXRpb24gfSBmcm9tIFwiQHBheWxvYWRjbXMvdWlcIjtcbmltcG9ydCB7IGNyZWF0ZUF1dGhDbGllbnQgfSBmcm9tIFwiYmV0dGVyLWF1dGgvcmVhY3RcIjtcbmltcG9ydCB7IHVzZU1lbW8sIHVzZVN0YXRlIH0gZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgeyB6IH0gZnJvbSBcInpvZFwiO1xuaW1wb3J0IHsgYWRtaW5Sb3V0ZXMgfSBmcm9tIFwiQC9iZXR0ZXItYXV0aC9wbHVnaW4vY29uc3RhbnRzXCI7XG5pbXBvcnQgeyB1c2VBcHBGb3JtIH0gZnJvbSBcIkAvc2hhcmVkL2Zvcm1cIjtcbmltcG9ydCB7IEZvcm0sIEZvcm1JbnB1dFdyYXAgfSBmcm9tIFwiQC9zaGFyZWQvZm9ybS91aVwiO1xuaW1wb3J0IHsgRm9ybUhlYWRlciB9IGZyb20gXCJAL3NoYXJlZC9mb3JtL3VpL2hlYWRlclwiO1xuaW1wb3J0IHsgZW1haWxSZWdleCB9IGZyb20gXCJAL3NoYXJlZC91dGlscy9yZWdleFwiO1xuXG5pbnRlcmZhY2UgRm9yZ290UGFzc3dvcmRGb3JtUHJvcHMge1xuICBiYXNlVVJMPzogc3RyaW5nO1xuICBiYXNlUGF0aD86IHN0cmluZztcbn1cblxu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from "@/better-auth/plugin/types";
|
|
4
|
+
interface ForgotPasswordProps extends AdminViewServerProps {
|
|
5
|
+
pluginOptions: PayloadAuthOptions;
|
|
6
|
+
}
|
|
7
|
+
declare function ForgotPassword({ pluginOptions, initPageResult }: ForgotPasswordProps): React.JSX.Element;
|
|
8
8
|
export default ForgotPassword;
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/forgot-password/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/forgot-password/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIrE,UAAU,mBAAoB,SAAQ,oBAAoB;IACxD,aAAa,EAAE,kBAAkB,CAAC;CACnC;AAED,iBAAS,cAAc,CAAC,EACtB,aAAa,EACb,cAAc,EACf,EAAE,mBAAmB,qBAiErB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { MinimalTemplate } from "@payloadcms/next/templates";
|
|
3
3
|
import { Button, Translation } from "@payloadcms/ui";
|
|
4
4
|
import Link from "next/link";
|
|
5
5
|
import { formatAdminURL } from "payload/shared";
|
|
6
|
+
import React, { Fragment } from "react";
|
|
7
|
+
import { adminRoutes } from "../../../constants";
|
|
6
8
|
import { FormHeader } from "../../../../../shared/form/ui/header";
|
|
7
9
|
import { ForgotPasswordForm } from "./client";
|
|
8
|
-
|
|
9
|
-
import { MinimalTemplate } from "@payloadcms/next/templates";
|
|
10
|
-
const ForgotPassword = ({ pluginOptions, initPageResult })=>{
|
|
10
|
+
function ForgotPassword({ pluginOptions, initPageResult }) {
|
|
11
11
|
const { req: { payload: { config: { admin: { routes: { account: accountRoute } }, routes: { admin: adminRoute } } }, user, i18n } } = initPageResult;
|
|
12
12
|
if (user) {
|
|
13
13
|
return /*#__PURE__*/ _jsxs(Fragment, {
|
|
@@ -15,7 +15,7 @@ const ForgotPassword = ({ pluginOptions, initPageResult })=>{
|
|
|
15
15
|
/*#__PURE__*/ _jsx(FormHeader, {
|
|
16
16
|
description: /*#__PURE__*/ _jsx(Translation, {
|
|
17
17
|
elements: {
|
|
18
|
-
|
|
18
|
+
"0": ({ children })=>/*#__PURE__*/ _jsx(Link, {
|
|
19
19
|
href: formatAdminURL({
|
|
20
20
|
adminRoute,
|
|
21
21
|
path: accountRoute
|
|
@@ -27,14 +27,14 @@ const ForgotPassword = ({ pluginOptions, initPageResult })=>{
|
|
|
27
27
|
i18nKey: "authentication:loggedInChangePassword",
|
|
28
28
|
t: i18n.t
|
|
29
29
|
}),
|
|
30
|
-
heading: i18n.t(
|
|
30
|
+
heading: i18n.t("authentication:alreadyLoggedIn")
|
|
31
31
|
}),
|
|
32
32
|
/*#__PURE__*/ _jsx(Button, {
|
|
33
33
|
buttonStyle: "secondary",
|
|
34
34
|
el: "link",
|
|
35
35
|
size: "large",
|
|
36
36
|
to: adminRoute,
|
|
37
|
-
children: i18n.t(
|
|
37
|
+
children: i18n.t("general:backToDashboard")
|
|
38
38
|
})
|
|
39
39
|
]
|
|
40
40
|
});
|
|
@@ -51,11 +51,11 @@ const ForgotPassword = ({ pluginOptions, initPageResult })=>{
|
|
|
51
51
|
path: adminRoutes.adminLogin
|
|
52
52
|
}),
|
|
53
53
|
prefetch: false,
|
|
54
|
-
children: i18n.t(
|
|
54
|
+
children: i18n.t("authentication:backToLogin")
|
|
55
55
|
})
|
|
56
56
|
]
|
|
57
57
|
});
|
|
58
|
-
}
|
|
58
|
+
}
|
|
59
59
|
export default ForgotPassword;
|
|
60
60
|
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vcGF5bG9hZC92aWV3cy9mb3Jnb3QtcGFzc3dvcmQvaW5kZXgudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE1pbmltYWxUZW1wbGF0ZSB9IGZyb20gXCJAcGF5bG9hZGNtcy9uZXh0L3RlbXBsYXRlc1wiO1xuaW1wb3J0IHsgQnV0dG9uLCBUcmFuc2xhdGlvbiB9IGZyb20gXCJAcGF5bG9hZGNtcy91aVwiO1xuaW1wb3J0IExpbmsgZnJvbSBcIm5leHQvbGlua1wiO1xuaW1wb3J0IHR5cGUgeyBBZG1pblZpZXdTZXJ2ZXJQcm9wcyB9IGZyb20gXCJwYXlsb2FkXCI7XG5pbXBvcnQgeyBmb3JtYXRBZG1pblVSTCB9IGZyb20gXCJwYXlsb2FkL3NoYXJlZFwiO1xuaW1wb3J0IFJlYWN0LCB7IEZyYWdtZW50IH0gZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgeyBhZG1pblJvdXRlcyB9IGZyb20gXCJAL2JldHRlci1hdXRoL3BsdWdpbi9jb25zdGFudHNcIjtcbmltcG9ydCB0eXBlIHsgUGF5bG9hZEF1dGhPcHRpb25zIH0gZnJvbSBcIkAvYmV0dGVyLWF1dGgvcGx1Z2luL3R5cGVzXCI7XG5pbXBvcnQgeyBGb3JtSGVhZGVyIH0gZnJvbSBcIkAvc2hhcmVkL2Zvcm0vdWkvaGVhZGVyXCI7XG5pbXBvcnQgeyBGb3Jnb3RQYXNzd29yZEZvcm0gfSBmcm9tIFwiLi9jbGllbnRcIjtcblxuaW50ZXJmYWNlIEZvcmdvdFBhc3N3b3JkUHJvcHMgZXh0ZW5kcyBBZG1pblZpZXdTZXJ2ZXJQcm9wcyB7XG4gIHBsdWdpbk9wdGlvbnM6IFBheWxvYWRBdXRoT3B0aW9ucztcbn1cblxuZnVuY3Rpb24gRm9yZ290UGFzc3dvcmQoe1xuICBwbHVnaW5PcHRpb25zLFxuICBpbml0UGFnZVJlc3VsdFxufTogRm9yZ290UGFzc3dvcmRQcm9wcykge1xuICBjb25zdCB7XG4gICAgcmVxOiB7XG4gICAgICBwYXlsb2FkOiB7XG4gICAgICAgIGNvbmZpZzoge1xuICAgICAgICAgIGFkbWluOiB7XG4gICAgICAgICAgICByb3V0ZXM6IHsgYWNjb3VudDogYWNjb3VudFJvdXRlIH1cbiAgICAgICAgICB9LFxuICAgICAgICAgIHJvdXRlczogeyBhZG1pbjogYWRtaW5Sb3V0ZSB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICB1c2VyLFxuICAgICAgaTE4blxuICAgIH1cbiAgfSA9IGluaXRQYWdlUmVzdWx0O1xuXG4gIGlmICh1c2VyKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxGcmFnbWVudD5cbiAgICAgICAgPEZvcm1IZWFkZXJcbiAgICAgICAgICBkZXNjcmlwdGlvbj17XG4gICAgICAgICAgICA8VHJhbnNsYXRpb25cbiAgICAgICAgICAgICAgZWxlbWVudHM9e3tcbiAgICAgICAgICAgICAgICBcIjBcIjogKHsgY2hpbGRyZW4gfSkgPT4gKFxuICAgICAgICAgICAgICAgICAgPExpbmtcbiAgICAgICAgICAgICAgICAgICAgaHJlZj17Zm9ybWF0QWRtaW5VUkwoe1xuICAgICAgICAgICAgICAgICAgICAgIGFkbWluUm91dGUsXG4gICAgICAgICAgICAgICAgICAgICAgcGF0aDogYWNjb3VudFJvdXRlXG4gICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICBwcmVmZXRjaD17ZmFsc2V9XG4gICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgICAgICAgIDwvTGluaz5cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIGkxOG5LZXk9XCJhdXRoZW50aWNhdGlvbjpsb2dnZWRJbkNoYW5nZVBhc3N3b3JkXCJcbiAgICAgICAgICAgICAgdD17aTE4bi50fVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICB9XG4gICAgICAgICAgaGVhZGluZz17aTE4bi50KFwiYXV0aGVudGljYXRpb246YWxyZWFkeUxvZ2dlZEluXCIpfVxuICAgICAgICAvPlxuICAgICAgICA8QnV0dG9uIGJ1dHRvblN0eWxlPVwic2Vjb25kYXJ5XCIgZWw9XCJsaW5rXCIgc2l6ZT1cImxhcmdlXCIgdG89e2FkbWluUm91dGV9PlxuICAgICAgICAgIHtpMThuLnQoXCJnZW5lcmFsOmJhY2tUb0Rhc2hib2FyZFwiKX1cbiAgICAgICAgPC9CdXR0b24+XG4gICAgICA8L0ZyYWdtZW50PlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxNaW5pbWFsVGVtcGxhdGU+XG4gICAgICA8Rm9yZ290UGFzc3dvcmRGb3JtXG4gICAgICAgIGJhc2VVUkw9e3BsdWdpbk9wdGlvbnMuYmV0dGVyQXV0aE9wdGlvbnM/LmJhc2VVUkx9XG4gICAgICAgIGJhc2VQYXRoPXtwbHVnaW5PcHRpb25zLmJldHRlckF1dGhPcHRpb25zPy5iYXNlUGF0aH1cbiAgICAgIC8+XG4gICAgICA8TGlua1xuICAgICAgICBocmVmPXtmb3JtYXRBZG1pblVSTCh7XG4gICAgICAgICAgYWRtaW5Sb3V0ZSxcbiAgICAgICAgICBwYXRoOiBhZG1pblJvdXRlcy5hZG1pbkxvZ2luIGFzIGAvJHtzdHJpbmd9YFxuICAgICAgICB9KX1cbiAgICAgICAgcHJlZmV0Y2g9e2ZhbHNlfVxuICAgICAgPlxuICAgICAgICB7aTE4bi50KFwiYXV0aGVudG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7Z0JBQ0FYLFVBQVU7MEJBRVROLEtBQUtRLENBQUMsQ0FBQzs7OztBQUloQjtBQUVBLGVBQWVwQixlQUFlIn0=
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface PasswordResetFormProps {
|
|
3
3
|
readonly token: string;
|
|
4
4
|
readonly minPasswordLength?: number;
|
|
5
5
|
readonly maxPasswordLength?: number;
|
|
6
6
|
readonly baseURL?: string;
|
|
7
7
|
readonly basePath?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare
|
|
8
|
+
}
|
|
9
|
+
export declare function PasswordResetForm({ token, baseURL, basePath }: PasswordResetFormProps): React.JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/reset-password/client.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/reset-password/client.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAO,EACP,QAAQ,EACT,EAAE,sBAAsB,qBAsHxB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { Form, FormInputWrap } from "../../../../../shared/form/ui";
|
|
3
|
+
import { toast, useAuth, useConfig, useTranslation } from "@payloadcms/ui";
|
|
4
|
+
import { createAuthClient } from "better-auth/react";
|
|
6
5
|
import { useRouter } from "next/navigation.js";
|
|
7
6
|
import { formatAdminURL } from "payload/shared";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import React, { useMemo } from "react";
|
|
8
|
+
import { z } from "zod";
|
|
10
9
|
import { useAppForm } from "../../../../../shared/form";
|
|
11
|
-
|
|
10
|
+
import { Form, FormInputWrap } from "../../../../../shared/form/ui";
|
|
11
|
+
export function PasswordResetForm({ token, baseURL, basePath }) {
|
|
12
12
|
const { t } = useTranslation();
|
|
13
13
|
const history = useRouter();
|
|
14
14
|
const { fetchFullUser } = useAuth();
|
|
@@ -18,8 +18,8 @@ export const PasswordResetForm = ({ token, baseURL, basePath })=>{
|
|
|
18
18
|
}), []);
|
|
19
19
|
const { config: { admin: { routes: { login: loginRoute } }, routes: { admin: adminRoute } } } = useConfig();
|
|
20
20
|
const resetPasswordSchema = z.object({
|
|
21
|
-
password: z.string().min(1, t(
|
|
22
|
-
confirmPassword: z.string().min(1, t(
|
|
21
|
+
password: z.string().min(1, t("validation:required") || "Password is required"),
|
|
22
|
+
confirmPassword: z.string().min(1, t("validation:required") || "Confirm password is required")
|
|
23
23
|
}).refine((data)=>{
|
|
24
24
|
// Only validate matching passwords if both fields have values
|
|
25
25
|
if (data.password && data.confirmPassword) {
|
|
@@ -28,15 +28,15 @@ export const PasswordResetForm = ({ token, baseURL, basePath })=>{
|
|
|
28
28
|
// If one or both fields are empty, validation will be handled by the min(1) validators
|
|
29
29
|
return true;
|
|
30
30
|
}, {
|
|
31
|
-
message: t(
|
|
31
|
+
message: t("fields:passwordsDoNotMatch") || "Passwords do not match",
|
|
32
32
|
path: [
|
|
33
|
-
|
|
33
|
+
"confirmPassword"
|
|
34
34
|
]
|
|
35
35
|
});
|
|
36
36
|
const form = useAppForm({
|
|
37
37
|
defaultValues: {
|
|
38
|
-
password:
|
|
39
|
-
confirmPassword:
|
|
38
|
+
password: "",
|
|
39
|
+
confirmPassword: ""
|
|
40
40
|
},
|
|
41
41
|
onSubmit: async ({ value })=>{
|
|
42
42
|
const { password } = value;
|
|
@@ -46,7 +46,7 @@ export const PasswordResetForm = ({ token, baseURL, basePath })=>{
|
|
|
46
46
|
token
|
|
47
47
|
});
|
|
48
48
|
if (error) {
|
|
49
|
-
toast.error(error.message ||
|
|
49
|
+
toast.error(error.message || "Error resetting password");
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
if (data?.status) {
|
|
@@ -59,10 +59,10 @@ export const PasswordResetForm = ({ token, baseURL, basePath })=>{
|
|
|
59
59
|
path: loginRoute
|
|
60
60
|
}));
|
|
61
61
|
}
|
|
62
|
-
toast.success(t(
|
|
62
|
+
toast.success(t("authentication:passwordResetSuccessfully"));
|
|
63
63
|
}
|
|
64
64
|
} catch (e) {
|
|
65
|
-
toast.error(
|
|
65
|
+
toast.error("An unexpected error occurred");
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
validators: {
|
|
@@ -83,7 +83,7 @@ export const PasswordResetForm = ({ token, baseURL, basePath })=>{
|
|
|
83
83
|
children: (field)=>/*#__PURE__*/ _jsx(field.TextField, {
|
|
84
84
|
type: "password",
|
|
85
85
|
className: "password",
|
|
86
|
-
label: t(
|
|
86
|
+
label: t("authentication:newPassword"),
|
|
87
87
|
required: true
|
|
88
88
|
})
|
|
89
89
|
}),
|
|
@@ -92,7 +92,7 @@ export const PasswordResetForm = ({ token, baseURL, basePath })=>{
|
|
|
92
92
|
children: (field)=>/*#__PURE__*/ _jsx(field.TextField, {
|
|
93
93
|
type: "password",
|
|
94
94
|
className: "password",
|
|
95
|
-
label: t(
|
|
95
|
+
label: t("authentication:confirmPassword"),
|
|
96
96
|
required: true
|
|
97
97
|
})
|
|
98
98
|
})
|
|
@@ -100,12 +100,12 @@ export const PasswordResetForm = ({ token, baseURL, basePath })=>{
|
|
|
100
100
|
}),
|
|
101
101
|
/*#__PURE__*/ _jsx(form.AppForm, {
|
|
102
102
|
children: /*#__PURE__*/ _jsx(form.Submit, {
|
|
103
|
-
label: t(
|
|
104
|
-
loadingLabel: t(
|
|
103
|
+
label: t("authentication:resetPassword"),
|
|
104
|
+
loadingLabel: t("general:loading")
|
|
105
105
|
})
|
|
106
106
|
})
|
|
107
107
|
]
|
|
108
108
|
});
|
|
109
|
-
}
|
|
109
|
+
}
|
|
110
110
|
|
|
111
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
111
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vcGF5bG9hZC92aWV3cy9yZXNldC1wYXNzd29yZC9jbGllbnQudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIGNsaWVudFwiO1xuXG5pbXBvcnQgeyB0b2FzdCwgdXNlQXV0aCwgdXNlQ29uZmlnLCB1c2VUcmFuc2xhdGlvbiB9IGZyb20gXCJAcGF5bG9hZGNtcy91aVwiO1xuaW1wb3J0IHsgY3JlYXRlQXV0aENsaWVudCB9IGZyb20gXCJiZXR0ZXItYXV0aC9yZWFjdFwiO1xuaW1wb3J0IHsgdXNlUm91dGVyIH0gZnJvbSBcIm5leHQvbmF2aWdhdGlvbi5qc1wiO1xuaW1wb3J0IHsgZm9ybWF0QWRtaW5VUkwgfSBmcm9tIFwicGF5bG9hZC9zaGFyZWRcIjtcbmltcG9ydCBSZWFjdCwgeyB1c2VNZW1vIH0gZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgeyB6IH0gZnJvbSBcInpvZFwiO1xuaW1wb3J0IHsgdXNlQXBwRm9ybSB9IGZyb20gXCJAL3NoYXJlZC9mb3Jt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U3VibWl0OiBhc3luYyAoeyB2YWx1ZSB9KSA9PiB7XG4gICAgICBjb25zdCB7IHBhc3N3b3JkIH0gPSB2YWx1ZTtcbiAgICAgIHRyeSB7XG4gICAgICAgIGNvbnN0IHsgZGF0YSwgZXJyb3IgfSA9IGF3YWl0IGF1dGhDbGllbnQucmVzZXRQYXNzd29yZCh7XG4gICAgICAgICAgbmV3UGFzc3dvcmQ6IHBhc3N3b3JkLFxuICAgICAgICAgIHRva2VuXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICB0b2FzdC5lcnJvcihlcnJvci5tZXNzYWdlIHx8IFwiRXJyb3IgcmVzZXR0aW5nIHBhc3N3b3JkXCIpO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZGF0YT8uc3RhdHVzKSB7XG4gICAgICAgICAgY29uc3QgdXNlciA9IGF3YWl0IGZldGNoRnVsbFVzZXIoKTtcbiAgICAgICAgICBpZiAodXNlcikge1xuICAgICAgICAgICAgaGlzdG9yeS5wdXNoKGFkbWluUm91dGUpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBoaXN0b3J5LnB1c2goXG4gICAgICAgICAgICAgIGZvcm1hdEFkbWluVVJMKHtcbiAgICAgICAgICAgICAgICBhZG1pblJvdXRlLFxuICAgICAgICAgICAgICAgIHBhdGg6IGxvZ2luUm91dGVcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRvYXN0LnN1Y2Nlc3ModChcImF1dGhlbnRpY2F0aW9uOnBhc3N3b3JkUmVzZXRTdWNjZXNzZnVsbHlcIikpO1xuICAgICAgICB9XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHRvYXN0LmVycm9yKFwiQW4gdW5leHBlY3RlZCBlcnJvciBvY2N1cnJlZFwiKTtcbiAgICAgIH1cbiAgICB9LFxuICAgIHZhbGlkYXRvcnM6IHtcbiAgICAgIG9uU3VibWl0OiByZXNldFBhc3N3b3JkU2NoZW1hXG4gICAgfVxuICB9KTtcblxuICByZXR1cm4gKFxuICAgIDxGb3JtXG4gICAgICBvblN1Ym1pdD17KGUpID0+IHtcbiAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB2b2lkIGZvcm0uaGFuZGxlU3VibWl0KCk7XG4gICAgICB9fVxuICAgID5cbiAgICAgIDxGb3JtSW5wdXRXcmFwIGNsYXNzTmFtZT1cImxvZ2luX19mb3JtXCI+XG4gICAgICAgIDxmb3JtLkFwcEZpZWxkXG4gICAgICAgICAgbmFtZT1cInBhc3N3b3JkXCJcbiAgICAgICAgICBjaGlsZHJlbj17KGZpZWxkKSA9PiAoXG4gICAgICAgICAgICA8ZmllbGQuVGV4dEZpZWxkXG4gICAgICAgICAgICAgIHR5cGU9XCJwYXNzd29yZFwiXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cInBhc3N3b3JkXCJcbiAgICAgICAgICAgICAgbGFiZWw9e3QoXCJhdXRoZW50aWNhdGlvbjpuZXdQYXNzd29yZFwiKX1cbiAgICAgICAgICAgICAgcmVxdWlyZWRcbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKX1cbiAgICAgICAgLz5cbiAgICAgICAgPGZvcm0uQXBwRmllbGRcbiAgICAgICAgICBuYW1lPVwiY29uZmlybVBhc3N3b3JkXCJcbiAgICAgICAgICBjaGlsZHJlbj17KGZpZWxkKSA9PiAoXG4gICAgICAgICAgICA8ZmllbGQuVGV4dEZpZWxkXG4gICAgICAgICAgICAgIHR5cGU9XCJwYXNzd29yZFwiXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cInBhc3N3b3JkXCJcbiAgICAgICAgICAgICAgbGFiZWw9e3QoXCJhdXRoZW50aWNhdGlvbjpjb25maXJtUGFzc3dvcmRcIil9XG4gICAgICAgICAgICAgIHJlcXVpcmVkXG4gICAgICAgICAgICAvPlxuICAg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
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
pluginOptions:
|
|
6
|
-
}
|
|
7
|
-
declare
|
|
1
|
+
import type { AdminViewServerProps } from "payload";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { PayloadAuthOptions } from "@/better-auth/plugin/types";
|
|
4
|
+
interface ResetPasswordProps extends AdminViewServerProps {
|
|
5
|
+
pluginOptions: PayloadAuthOptions;
|
|
6
|
+
}
|
|
7
|
+
declare function ResetPassword({ pluginOptions, initPageResult, searchParams }: ResetPasswordProps): React.JSX.Element;
|
|
8
8
|
export default ResetPassword;
|
|
9
9
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/reset-password/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAUrE,UAAU,kBAAmB,SAAQ,oBAAoB;IACvD,aAAa,EAAE,kBAAkB,CAAC;CACnC;AAED,iBAAS,aAAa,CAAC,EACrB,aAAa,EACb,cAAc,EACd,YAAY,EACb,EAAE,kBAAkB,qBAyEpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { MinimalTemplate } from "@payloadcms/next/templates";
|
|
3
3
|
import { Button, Link, Translation } from "@payloadcms/ui";
|
|
4
4
|
import { formatAdminURL } from "payload/shared";
|
|
5
|
-
import
|
|
5
|
+
import React from "react";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
+
import { adminRoutes } from "../../../constants";
|
|
7
8
|
import { FormHeader } from "../../../../../shared/form/ui/header";
|
|
8
9
|
import { PasswordResetForm } from "./client";
|
|
9
|
-
import { adminRoutes } from "../../../constants";
|
|
10
10
|
const resetPasswordParamsSchema = z.object({
|
|
11
11
|
token: z.string()
|
|
12
12
|
});
|
|
13
|
-
const resetPasswordBaseClass =
|
|
14
|
-
|
|
13
|
+
const resetPasswordBaseClass = "reset-password";
|
|
14
|
+
function ResetPassword({ pluginOptions, initPageResult, searchParams }) {
|
|
15
15
|
const { req: { user, t, payload: { config: { routes: { admin: adminRoute }, admin: { routes: { account: accountRoute } } } } } } = initPageResult;
|
|
16
16
|
if (user) {
|
|
17
17
|
return /*#__PURE__*/ _jsxs(MinimalTemplate, {
|
|
@@ -20,7 +20,7 @@ const ResetPassword = ({ pluginOptions, initPageResult, searchParams })=>{
|
|
|
20
20
|
/*#__PURE__*/ _jsx(FormHeader, {
|
|
21
21
|
description: /*#__PURE__*/ _jsx(Translation, {
|
|
22
22
|
elements: {
|
|
23
|
-
|
|
23
|
+
"0": ({ children })=>/*#__PURE__*/ _jsx(Link, {
|
|
24
24
|
href: formatAdminURL({
|
|
25
25
|
adminRoute,
|
|
26
26
|
path: accountRoute
|
|
@@ -32,14 +32,14 @@ const ResetPassword = ({ pluginOptions, initPageResult, searchParams })=>{
|
|
|
32
32
|
i18nKey: "authentication:loggedInChangePassword",
|
|
33
33
|
t: t
|
|
34
34
|
}),
|
|
35
|
-
heading: t(
|
|
35
|
+
heading: t("authentication:alreadyLoggedIn")
|
|
36
36
|
}),
|
|
37
37
|
/*#__PURE__*/ _jsx(Button, {
|
|
38
38
|
buttonStyle: "secondary",
|
|
39
39
|
el: "link",
|
|
40
40
|
size: "large",
|
|
41
41
|
to: adminRoute,
|
|
42
|
-
children: t(
|
|
42
|
+
children: t("general:backToDashboard")
|
|
43
43
|
})
|
|
44
44
|
]
|
|
45
45
|
});
|
|
@@ -55,7 +55,7 @@ const ResetPassword = ({ pluginOptions, initPageResult, searchParams })=>{
|
|
|
55
55
|
className: `${resetPasswordBaseClass}`,
|
|
56
56
|
children: [
|
|
57
57
|
/*#__PURE__*/ _jsx(FormHeader, {
|
|
58
|
-
heading: t(
|
|
58
|
+
heading: t("authentication:resetPassword")
|
|
59
59
|
}),
|
|
60
60
|
/*#__PURE__*/ _jsx(PasswordResetForm, {
|
|
61
61
|
token: token,
|
|
@@ -68,11 +68,11 @@ const ResetPassword = ({ pluginOptions, initPageResult, searchParams })=>{
|
|
|
68
68
|
path: adminRoutes.adminLogin
|
|
69
69
|
}),
|
|
70
70
|
prefetch: false,
|
|
71
|
-
children: t(
|
|
71
|
+
children: t("authentication:backToLogin")
|
|
72
72
|
})
|
|
73
73
|
]
|
|
74
74
|
});
|
|
75
|
-
}
|
|
75
|
+
}
|
|
76
76
|
export default ResetPassword;
|
|
77
77
|
|
|
78
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9iZXR0ZXItYXV0aC9wbHVnaW4vcGF5bG9hZC92aWV3cy9yZXNldC1wYXNzd29yZC9pbmRleC50c3giXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTWluaW1hbFRlbXBsYXRlIH0gZnJvbSBcIkBwYXlsb2FkY21zL25leHQvdGVtcGxhdGVzXCI7XG5pbXBvcnQgeyBCdXR0b24sIExpbmssIFRyYW5zbGF0aW9uIH0gZnJvbSBcIkBwYXlsb2FkY21zL3VpXCI7XG5pbXBvcnQgdHlwZSB7IEFkbWluVmlld1NlcnZlclByb3BzIH0gZnJvbSBcInBheWxvYWRcIjtcbmltcG9ydCB7IGZvcm1hdEFkbWluVVJMIH0gZnJvbSBcInBheWxvYWQvc2hhcmVkXCI7XG5pbXBvcnQgUmVhY3QgZnJvbSBcInJlYW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gICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0gPSBpbml0UGFnZVJlc3VsdDtcblxuICBpZiAodXNlcikge1xuICAgIHJldHVybiAoXG4gICAgICA8TWluaW1hbFRlbXBsYXRlIGNsYXNzTmFtZT17YCR7cmVzZXRQYXNzd29yZEJhc2VDbGFzc31gfT5cbiAgICAgICAgPEZvcm1IZWFkZXJcbiAgICAgICAgICBkZXNjcmlwdGlvbj17XG4gICAgICAgICAgICA8VHJhbnNsYXRpb25cbiAgICAgICAgICAgICAgZWxlbWVudHM9e3tcbiAgICAgICAgICAgICAgICBcIjBcIjogKHsgY2hpbGRyZW4gfSkgPT4gKFxuICAgICAgICAgICAgICAgICAgPExpbmtcbiAgICAgICAgICAgICAgICAgICAgaHJlZj17Zm9ybWF0QWRtaW5VUkwoe1xuICAgICAgICAgICAgICAgICAgICAgIGFkbWluUm91dGUsXG4gICAgICAgICAgICAgICAgICAgICAgcGF0aDogYWNjb3VudFJvdXRlXG4gICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICBwcmVmZXRjaD17ZmFsc2V9XG4gICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgICAgICAgIDwvTGluaz5cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIGkxOG5LZXk9XCJhdXRoZW50aWNhdGlvbjpsb2dnZWRJbkNoYW5nZVBhc3N3b3JkXCJcbiAgICAgICAgICAgICAgdD17dH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgfVxuICAgICAgICAgIGhlYWRpbmc9e3QoXCJhdXRoZW50aWNhdGlvbjphbHJlYWR5TG9nZ2VkSW5cIil9XG4gICAgICAgIC8+XG4gICAgICAgIDxCdXR0b24gYnV0dG9uU3R5bGU9XCJzZWNvbmRhcnlcIiBlbD1cImxpbmtcIiBzaXplPVwibGFyZ2VcIi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BQ1JmLEdBQUdBOztvQkFHUGdCLFNBQVNoQixFQUFFOzs4QkFFYixLQUFDcEI7b0JBQU9xQyxhQUFZO29CQUFZQyxJQUFHO29CQUFPQyxNQUFLO29CQUFRQyxJQUFJZjs4QkFDeERMLEVBQUU7Ozs7SUFJWDtJQUVBLE1BQU1xQixzQkFBc0JoQywwQkFBMEJpQyxTQUFTLENBQUN6QjtJQUNoRSxJQUFJLENBQUN3QixvQkFBb0JFLE9BQU8sRUFBRTtRQUNoQyxxQkFBTyxLQUFDQztzQkFBSTs7SUFDZDtJQUNBLE1BQU0sRUFBRWpDLEtBQUssRUFBRSxHQUFHOEIsb0JBQW9CSSxJQUFJO0lBRTFDLHFCQUNFLE1BQUM5QztRQUFnQjZCLFdBQVcsR0FBR2Ysd0JBQXdCOzswQkFDckQsS0FBQ047Z0JBQVc2QixTQUFTaEIsRUFBRTs7MEJBQ3ZCLEtBQUNaO2dCQUNDRyxPQUFPQTtnQkFDUG1DLFNBQVMvQixjQUFjZ0MsaUJBQWlCLEVBQUVEO2dCQUMxQ0UsVUFBVWpDLGNBQWNnQyxpQkFBaUIsRUFBRUM7OzBCQUU3QyxLQUFDL0M7Z0JBQ0MrQixNQUFNN0IsZUFBZTtvQkFDbkJzQjtvQkFDQVEsTUFBTTNCLFlBQVkyQyxVQUFVO2dCQUM5QjtnQkFDQWYsVUFBVTswQkFFVGQsRUFBRTs7OztBQUlYO0FBRUEsZUFBZU4sY0FBYyJ9
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
interface TwoFactorVerifyFormProps {
|
|
2
2
|
redirect: string;
|
|
3
3
|
twoFactorDigits?: number;
|
|
4
4
|
baseURL?: string;
|
|
5
5
|
basePath?: string;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
|
+
export declare function TwoFactorVerifyForm({ redirect, twoFactorDigits, baseURL, basePath }: TwoFactorVerifyFormProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
7
9
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/two-factor-verify/client.tsx"],"names":[],"mappings":"AAYA,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/better-auth/plugin/payload/views/two-factor-verify/client.tsx"],"names":[],"mappings":"AAYA,UAAU,wBAAwB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,eAAmB,EACnB,OAAO,EACP,QAAQ,EACT,EAAE,wBAAwB,+BAiE1B"}
|