UNPKG

@daveyplate/better-auth-ui

Version:

Plug & play shadcn/ui components for better-auth

1,220 lines (1,199 loc) 40.6 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; import { ComponentType, ReactNode } from 'react'; import { SocialProvider } from 'better-auth/social-providers'; import { a as AuthClient, A as AuthHooks, b as AnyAuthClient } from './auth-hooks-DL8c3_Dy.cjs'; import { A as AuthMutators } from './auth-mutators-CK8vxOJz.cjs'; import { A as AuthViewPaths } from './auth-view-paths-Ctk94WJ-.cjs'; declare const authLocalization: { INVALID_USERNAME_OR_PASSWORD: string; EMAIL_NOT_VERIFIED: string; UNEXPECTED_ERROR: string; USERNAME_IS_ALREADY_TAKEN: string; USERNAME_TOO_SHORT: string; USERNAME_TOO_LONG: string; INVALID_USERNAME: string; OTP_NOT_ENABLED: string; OTP_HAS_EXPIRED: string; TOTP_NOT_ENABLED: string; TWO_FACTOR_NOT_ENABLED: string; BACKUP_CODES_NOT_ENABLED: string; INVALID_BACKUP_CODE: string; INVALID_CODE: string; TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: string; INVALID_TWO_FACTOR_COOKIE: string; SUBSCRIPTION_NOT_FOUND: string; SUBSCRIPTION_PLAN_NOT_FOUND: string; ALREADY_SUBSCRIBED_PLAN: string; UNABLE_TO_CREATE_CUSTOMER: string; FAILED_TO_FETCH_PLANS: string; EMAIL_VERIFICATION_REQUIRED: string; SUBSCRIPTION_NOT_ACTIVE: string; SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION: string; INVALID_PHONE_NUMBER: string; PHONE_NUMBER_EXIST: string; INVALID_PHONE_NUMBER_OR_PASSWORD: string; OTP_NOT_FOUND: string; OTP_EXPIRED: string; INVALID_OTP: string; PHONE_NUMBER_NOT_VERIFIED: string; CHALLENGE_NOT_FOUND: string; YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: string; FAILED_TO_VERIFY_REGISTRATION: string; PASSKEY_NOT_FOUND: string; AUTHENTICATION_FAILED: string; UNABLE_TO_CREATE_SESSION: string; FAILED_TO_UPDATE_PASSKEY: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: string; YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: string; ORGANIZATION_ALREADY_EXISTS: string; ORGANIZATION_NOT_FOUND: string; USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: string; NO_ACTIVE_ORGANIZATION: string; USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: string; MEMBER_NOT_FOUND: string; ROLE_NOT_FOUND: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: string; TEAM_ALREADY_EXISTS: string; TEAM_NOT_FOUND: string; YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: string; YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: string; USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: string; INVITATION_NOT_FOUND: string; YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: string; YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: string; INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: string; FAILED_TO_RETRIEVE_INVITATION: string; YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: string; UNABLE_TO_REMOVE_LAST_TEAM: string; YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: string; ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: string; INVITATION_LIMIT_REACHED: string; INVALID_SESSION_TOKEN: string; PASSWORD_COMPROMISED: string; INVALID_OAUTH_CONFIGURATION: string; INVALID_EMAIL: string; USER_NOT_FOUND: string; TOO_MANY_ATTEMPTS: string; MISSING_SECRET_KEY: string; SERVICE_UNAVAILABLE: string; VERIFICATION_FAILED: string; MISSING_RESPONSE: string; UNKNOWN_ERROR: string; INVALID_METADATA_TYPE: string; REFILL_AMOUNT_AND_INTERVAL_REQUIRED: string; REFILL_INTERVAL_AND_AMOUNT_REQUIRED: string; USER_BANNED: string; UNAUTHORIZED_SESSION: string; KEY_NOT_FOUND: string; KEY_DISABLED: string; KEY_EXPIRED: string; USAGE_EXCEEDED: string; KEY_NOT_RECOVERABLE: string; EXPIRES_IN_IS_TOO_SMALL: string; EXPIRES_IN_IS_TOO_LARGE: string; INVALID_REMAINING: string; INVALID_PREFIX_LENGTH: string; INVALID_NAME_LENGTH: string; METADATA_DISABLED: string; RATE_LIMIT_EXCEEDED: string; NO_VALUES_TO_UPDATE: string; KEY_DISABLED_EXPIRATION: string; INVALID_API_KEY: string; INVALID_USER_ID_FROM_API_KEY: string; INVALID_API_KEY_GETTER_RETURN_TYPE: string; SERVER_ONLY_PROPERTY: string; FAILED_TO_CREATE_USER: string; COULD_NOT_CREATE_SESSION: string; ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: string; USER_ALREADY_EXISTS: string; YOU_CANNOT_BAN_YOURSELF: string; YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: string; YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: string; YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: string; YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: string; YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: string; YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: string; YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: string; BANNED_USER: string; FAILED_TO_CREATE_SESSION: string; FAILED_TO_UPDATE_USER: string; FAILED_TO_GET_SESSION: string; INVALID_PASSWORD: string; INVALID_EMAIL_OR_PASSWORD: string; SOCIAL_ACCOUNT_ALREADY_LINKED: string; PROVIDER_NOT_FOUND: string; INVALID_TOKEN: string; ID_TOKEN_NOT_SUPPORTED: string; FAILED_TO_GET_USER_INFO: string; USER_EMAIL_NOT_FOUND: string; PASSWORD_TOO_SHORT: string; PASSWORD_TOO_LONG: string; EMAIL_CAN_NOT_BE_UPDATED: string; CREDENTIAL_ACCOUNT_NOT_FOUND: string; SESSION_EXPIRED: string; FAILED_TO_UNLINK_LAST_ACCOUNT: string; ACCOUNT_NOT_FOUND: string; USER_ALREADY_HAS_PASSWORD: string; /** @default "Account" */ ACCOUNT: string; /** @default "Accounts" */ ACCOUNTS: string; /** @default "Manage your currently signed in accounts." */ ACCOUNTS_DESCRIPTION: string; /** @default "Sign in to an additional account." */ ACCOUNTS_INSTRUCTIONS: string; /** @default "Add Account" */ ADD_ACCOUNT: string; /** @default "Add Passkey" */ ADD_PASSKEY: string; /** @default "Already have an account?" */ ALREADY_HAVE_AN_ACCOUNT: string; /** @default "Avatar" */ AVATAR: string; /** @default "Click on the avatar to upload a custom one from your files." */ AVATAR_DESCRIPTION: string; /** @default "An avatar is optional but strongly recommended." */ AVATAR_INSTRUCTIONS: string; /** @default "Backup code is required" */ BACKUP_CODE_REQUIRED: string; /** @default "Backup Codes" */ BACKUP_CODES: string; /** @default "Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method." */ BACKUP_CODES_DESCRIPTION: string; /** @default "Backup Code." */ BACKUP_CODE_PLACEHOLDER: string; /** @default "Backup Code" */ BACKUP_CODE: string; /** @default "Cancel" */ CANCEL: string; /** @default "Change Password" */ CHANGE_PASSWORD: string; /** @default "Enter your current password and a new password." */ CHANGE_PASSWORD_DESCRIPTION: string; /** @default "Please use 8 characters at minimum." */ CHANGE_PASSWORD_INSTRUCTIONS: string; /** @default "Your password has been changed." */ CHANGE_PASSWORD_SUCCESS: string; /** @default "Confirm Password" */ CONFIRM_PASSWORD: string; /** @default "Confirm Password" */ CONFIRM_PASSWORD_PLACEHOLDER: string; /** @default "Confirm password is required" */ CONFIRM_PASSWORD_REQUIRED: string; /** @default "Continue with Authenticator" */ CONTINUE_WITH_AUTHENTICATOR: string; /** @default "Copied to clipboard" */ COPIED_TO_CLIPBOARD: string; /** @default "Copy to clipboard" */ COPY_TO_CLIPBOARD: string; /** @default "Copy all codes" */ COPY_ALL_CODES: string; /** @default "Continue" */ CONTINUE: string; /** @default "Current Password" */ CURRENT_PASSWORD: string; /** @default "Current Password" */ CURRENT_PASSWORD_PLACEHOLDER: string; /** @default "Current Session" */ CURRENT_SESSION: string; /** @default "Delete" */ DELETE: string; /** @default "Delete Avatar" */ DELETE_AVATAR: string; /** @default "Delete Account" */ DELETE_ACCOUNT: string; /** @default "Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution." */ DELETE_ACCOUNT_DESCRIPTION: string; /** @default "Please confirm the deletion of your account. This action is not reversible, so please continue with caution." */ DELETE_ACCOUNT_INSTRUCTIONS: string; /** @default "Please check your email to verify the deletion of your account." */ DELETE_ACCOUNT_VERIFY: string; /** @default "Your account has been deleted." */ DELETE_ACCOUNT_SUCCESS: string; /** @default "Disable Two-Factor" */ DISABLE_TWO_FACTOR: string; /** @default "Choose a provider to login to your account" */ DISABLED_CREDENTIALS_DESCRIPTION: string; /** @default "Don't have an account?" */ DONT_HAVE_AN_ACCOUNT: string; /** @default "Done" */ DONE: string; /** @default "Email" */ EMAIL: string; /** @default "Enter the email address you want to use to log in." */ EMAIL_DESCRIPTION: string; /** @default "Please enter a valid email address." */ EMAIL_INSTRUCTIONS: string; /** @default "Email is the same" */ EMAIL_IS_THE_SAME: string; /** @default "m@example.com" */ EMAIL_PLACEHOLDER: string; /** @default "Email address is required" */ EMAIL_REQUIRED: string; /** @default "Please check your email to verify the change." */ EMAIL_VERIFY_CHANGE: string; /** @default "Please check your email for the verification link." */ EMAIL_VERIFICATION: string; /** @default "Enable Two-Factor" */ ENABLE_TWO_FACTOR: string; /** @default "is invalid" */ IS_INVALID: string; /** @default "is required" */ IS_REQUIRED: string; /** @default "is the same" */ IS_THE_SAME: string; /** @default "Forgot authenticator?" */ FORGOT_AUTHENTICATOR: string; /** @default "Forgot Password" */ FORGOT_PASSWORD: string; /** @default "Send reset link" */ FORGOT_PASSWORD_ACTION: string; /** @default "Enter your email to reset your password" */ FORGOT_PASSWORD_DESCRIPTION: string; /** @default "Check your email for the password reset link." */ FORGOT_PASSWORD_EMAIL: string; /** @default "Forgot your password?" */ FORGOT_PASSWORD_LINK: string; /** @default "Link" */ LINK: string; /** @default "Magic Link" */ MAGIC_LINK: string; /** @default "Send magic link" */ MAGIC_LINK_ACTION: string; /** @default "Enter your email to receive a magic link" */ MAGIC_LINK_DESCRIPTION: string; /** @default "Check your email for the magic link" */ MAGIC_LINK_EMAIL: string; /** @default "Email Code" */ EMAIL_OTP: string; /** @default "Send code" */ EMAIL_OTP_SEND_ACTION: string; /** @default "Verify code" */ EMAIL_OTP_VERIFY_ACTION: string; /** @default "Enter your email to receive a code" */ EMAIL_OTP_DESCRIPTION: string; /** @default "Please check your email for the verification code." */ EMAIL_OTP_VERIFICATION_SENT: string; /** @default "Name" */ NAME: string; /** @default "Please enter your full name, or a display name." */ NAME_DESCRIPTION: string; /** @default "Please use 32 characters at maximum." */ NAME_INSTRUCTIONS: string; /** @default "Name" */ NAME_PLACEHOLDER: string; /** @default "New Password" */ NEW_PASSWORD: string; /** @default "New Password" */ NEW_PASSWORD_PLACEHOLDER: string; /** @default "New password is required" */ NEW_PASSWORD_REQUIRED: string; /** @default "One-Time Password" */ ONE_TIME_PASSWORD: string; /** @default "Or continue with" */ OR_CONTINUE_WITH: string; /** @default "Passkey" */ PASSKEY: string; /** @default "Passkeys" */ PASSKEYS: string; /** @default "Manage your passkeys for secure access." */ PASSKEYS_DESCRIPTION: string; /** @default "Securely access your account without a password." */ PASSKEYS_INSTRUCTIONS: string; /** @default "Personal Account" */ PERSONAL_ACCOUNT: string; /** @default "API Keys" */ API_KEYS: string; /** @default "Manage your API keys for secure access." */ API_KEYS_DESCRIPTION: string; /** @default "Generate API keys to access your account programmatically." */ API_KEYS_INSTRUCTIONS: string; /** @default "Create API Key" */ CREATE_API_KEY: string; /** @default "Enter a unique name for your API key to differentiate it from other keys." */ CREATE_API_KEY_DESCRIPTION: string; /** @default "New API Key" */ API_KEY_NAME_PLACEHOLDER: string; /** @default "API Key Created" */ API_KEY_CREATED: string; /** @default "Please copy your API key and store it in a safe place. For security reasons we cannot show it again." */ CREATE_API_KEY_SUCCESS: string; /** @default "Never Expires" */ NEVER_EXPIRES: string; /** @default "Expires" */ EXPIRES: string; /** @default "No Expiration" */ NO_EXPIRATION: string; /** @default "Create Organization" */ CREATE_ORGANIZATION: string; /** @default "Organization" */ ORGANIZATION: string; /** @default "Name" */ ORGANIZATION_NAME: string; /** @default "Acme Inc." */ ORGANIZATION_NAME_PLACEHOLDER: string; /** @default "This is your organization's visible name." */ ORGANIZATION_NAME_DESCRIPTION: string; /** @default "Please use 32 characters at maximum." */ ORGANIZATION_NAME_INSTRUCTIONS: string; /** @default "Slug URL" */ ORGANIZATION_SLUG: string; /** @default "This is your organization's URL namespace." */ ORGANIZATION_SLUG_DESCRIPTION: string; /** @default "Please use 48 characters at maximum." */ ORGANIZATION_SLUG_INSTRUCTIONS: string; /** @default "acme-inc" */ ORGANIZATION_SLUG_PLACEHOLDER: string; /** @default "Organization created successfully" */ CREATE_ORGANIZATION_SUCCESS: string; /** @default "Password" */ PASSWORD: string; /** @default "Password" */ PASSWORD_PLACEHOLDER: string; /** @default "Password is required" */ PASSWORD_REQUIRED: string; /** @default "Passwords do not match" */ PASSWORDS_DO_NOT_MATCH: string; /** @default "Providers" */ PROVIDERS: string; /** @default "Connect your account with a third-party service." */ PROVIDERS_DESCRIPTION: string; /** @default "Recover Account" */ RECOVER_ACCOUNT: string; /** @default "Recover account" */ RECOVER_ACCOUNT_ACTION: string; /** @default "Please enter a backup code to access your account" */ RECOVER_ACCOUNT_DESCRIPTION: string; /** @default "Remember me" */ REMEMBER_ME: string; /** @default "Resend code" */ RESEND_CODE: string; /** @default "Resend verification email" */ RESEND_VERIFICATION_EMAIL: string; /** @default "Reset Password" */ RESET_PASSWORD: string; /** @default "Save new password" */ RESET_PASSWORD_ACTION: string; /** @default "Enter your new password below" */ RESET_PASSWORD_DESCRIPTION: string; /** @default "Password reset successfully" */ RESET_PASSWORD_SUCCESS: string; /** @default "Request failed" */ REQUEST_FAILED: string; /** @default "Revoke" */ REVOKE: string; /** @default "Delete API Key" */ DELETE_API_KEY: string; /** @default "Are you sure you want to delete this API key?" */ DELETE_API_KEY_CONFIRM: string; /** @default "API Key" */ API_KEY: string; /** @default "Sign In" */ SIGN_IN: string; /** @default "Login" */ SIGN_IN_ACTION: string; /** @default "Enter your email below to login to your account" */ SIGN_IN_DESCRIPTION: string; /** @default "Enter your username or email below to login to your account" */ SIGN_IN_USERNAME_DESCRIPTION: string; /** @default "Sign in with" */ SIGN_IN_WITH: string; /** @default "Sign Out" */ SIGN_OUT: string; /** @default "Sign Up" */ SIGN_UP: string; /** @default "Create an account" */ SIGN_UP_ACTION: string; /** @default "Enter your information to create an account" */ SIGN_UP_DESCRIPTION: string; /** @default "Check your email for the verification link." */ SIGN_UP_EMAIL: string; /** @default "Sessions" */ SESSIONS: string; /** @default "Manage your active sessions and revoke access." */ SESSIONS_DESCRIPTION: string; /** @default "Set Password" */ SET_PASSWORD: string; /** @default "Click the button below to receive an email to set up a password for your account." */ SET_PASSWORD_DESCRIPTION: string; /** @default "Settings" */ SETTINGS: string; /** @default "Save" */ SAVE: string; /** @default "Security" */ SECURITY: string; /** @default "Switch Account" */ SWITCH_ACCOUNT: string; /** @default "Trust this device" */ TRUST_DEVICE: string; /** @default "Two-Factor" */ TWO_FACTOR: string; /** @default "Verify code" */ TWO_FACTOR_ACTION: string; /** @default "Please enter your one-time password to continue" */ TWO_FACTOR_DESCRIPTION: string; /** @default "Add an extra layer of security to your account." */ TWO_FACTOR_CARD_DESCRIPTION: string; /** @default "Please enter your password to disable 2FA." */ TWO_FACTOR_DISABLE_INSTRUCTIONS: string; /** @default "Please enter your password to enable 2FA" */ TWO_FACTOR_ENABLE_INSTRUCTIONS: string; /** @default "Two-factor authentication has been enabled" */ TWO_FACTOR_ENABLED: string; /** @default "Two-Factor Authentication has been disabled" */ TWO_FACTOR_DISABLED: string; /** @default "Two-Factor Authentication" */ TWO_FACTOR_PROMPT: string; /** @default "Scan the QR Code with your Authenticator" */ TWO_FACTOR_TOTP_LABEL: string; /** @default "Send verification code" */ SEND_VERIFICATION_CODE: string; /** @default "Unlink" */ UNLINK: string; /** @default "Updated successfully" */ UPDATED_SUCCESSFULLY: string; /** @default "Username" */ USERNAME: string; /** @default "Enter the username you want to use to log in." */ USERNAME_DESCRIPTION: string; /** @default "Please use 32 characters at maximum." */ USERNAME_INSTRUCTIONS: string; /** @default "Username" */ USERNAME_PLACEHOLDER: string; /** @default "Username or email" */ SIGN_IN_USERNAME_PLACEHOLDER: string; /** @default "Verify Your Email" */ VERIFY_YOUR_EMAIL: string; /** @default "Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend." */ VERIFY_YOUR_EMAIL_DESCRIPTION: string; /** @default "Go back" */ GO_BACK: string; /** @default "Your session is not fresh. Please sign in again." */ SESSION_NOT_FRESH: string; /** @default "Upload Avatar" */ UPLOAD_AVATAR: string; /** @default "Logo" */ LOGO: string; /** @default "Click on the logo to upload a custom one from your files." */ LOGO_DESCRIPTION: string; /** @default "A logo is optional but strongly recommended." */ LOGO_INSTRUCTIONS: string; /** @default "Upload" */ UPLOAD: string; /** @default "Upload Logo" */ UPLOAD_LOGO: string; /** @default "Delete Logo" */ DELETE_LOGO: string; /** @default "Privacy Policy" */ PRIVACY_POLICY: string; /** @default "Terms of Service" */ TERMS_OF_SERVICE: string; /** @default "This site is protected by reCAPTCHA." */ PROTECTED_BY_RECAPTCHA: string; /** @default "By continuing, you agree to the" */ BY_CONTINUING_YOU_AGREE: string; /** @default "User" */ USER: string; /** @default "Organizations" */ ORGANIZATIONS: string; /** @default "Manage your organizations and memberships." */ ORGANIZATIONS_DESCRIPTION: string; /** @default "Create an organization to collaborate with other users." */ ORGANIZATIONS_INSTRUCTIONS: string; /** @default "Leave Organization" */ LEAVE_ORGANIZATION: string; /** @default "Are you sure you want to leave this organization?" */ LEAVE_ORGANIZATION_CONFIRM: string; /** @default "You have successfully left the organization." */ LEAVE_ORGANIZATION_SUCCESS: string; /** @default "Manage Organization" */ MANAGE_ORGANIZATION: string; /** @default "Remove Member" */ REMOVE_MEMBER: string; /** @default "Are you sure you want to remove this member from the organization?" */ REMOVE_MEMBER_CONFIRM: string; /** @default "Member removed successfully" */ REMOVE_MEMBER_SUCCESS: string; /** @default "Invite Member" */ INVITE_MEMBER: string; /** @default "Members" */ MEMBERS: string; /** @default "Add or remove members and manage their roles." */ MEMBERS_DESCRIPTION: string; /** @default "Invite new members to your organization." */ MEMBERS_INSTRUCTIONS: string; /** @default "Send an invitation to add a new member to your organization." */ INVITE_MEMBER_DESCRIPTION: string; /** @default "Role" */ ROLE: string; /** @default "Select a role" */ SELECT_ROLE: string; /** @default "Admin" */ ADMIN: string; /** @default "Member" */ MEMBER: string; /** @default "Guest" */ GUEST: string; /** @default "Owner" */ OWNER: string; /** @default "Update the role for this member" */ UPDATE_ROLE_DESCRIPTION: string; /** @default "Update Role" */ UPDATE_ROLE: string; /** @default "Member role updated successfully" */ MEMBER_ROLE_UPDATED: string; /** @default "Send Invitation" */ SEND_INVITATION: string; /** @default "Invitation sent successfully" */ SEND_INVITATION_SUCCESS: string; /** @default "Pending Invitations" */ PENDING_INVITATIONS: string; /** @default "Manage pending invitations to your organization." */ PENDING_INVITATIONS_DESCRIPTION: string; /** @default "Cancel Invitation" */ CANCEL_INVITATION: string; /** @default "Invitation cancelled successfully" */ INVITATION_CANCELLED: string; /** @default "Accept Invitation" */ ACCEPT_INVITATION: string; /** @default "You have been invited to join an organization." */ ACCEPT_INVITATION_DESCRIPTION: string; /** @default "Invitation accepted successfully" */ INVITATION_ACCEPTED: string; /** @default "Invitation rejected successfully" */ INVITATION_REJECTED: string; /** @default "Accept" */ ACCEPT: string; /** @default "Reject" */ REJECT: string; /** @default "This invitation has expired" */ INVITATION_EXPIRED: string; /** @default "Delete Organization" */ DELETE_ORGANIZATION: string; /** @default "Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution." */ DELETE_ORGANIZATION_DESCRIPTION: string; /** @default "Organization deleted successfully" */ DELETE_ORGANIZATION_SUCCESS: string; /** @default "Enter the organization slug to continue:" */ DELETE_ORGANIZATION_INSTRUCTIONS: string; /** @default "Organization slug is required" */ SLUG_REQUIRED: string; /** @default "The slug does not match" */ SLUG_DOES_NOT_MATCH: string; }; type AuthLocalization = Partial<typeof authLocalization>; type PasswordValidation = { /** * Maximum password length */ maxLength?: number; /** * Minimum password length */ minLength?: number; /** * Password validation regex */ regex?: RegExp; }; interface ProviderIconProps { className?: string; } type ProviderIcon = ComponentType<ProviderIconProps>; declare const AppleIcon: ProviderIcon; declare const DiscordIcon: ProviderIcon; declare const DropboxIcon: ProviderIcon; declare const FacebookIcon: ProviderIcon; declare const GitHubIcon: ProviderIcon; declare const GitLabIcon: ProviderIcon; declare const GoogleIcon: ProviderIcon; declare const KickIcon: ProviderIcon; declare const LinkedInIcon: ProviderIcon; declare const MicrosoftIcon: ProviderIcon; declare const RedditIcon: ProviderIcon; declare const RobloxIcon: ProviderIcon; declare const SpotifyIcon: ProviderIcon; declare const TikTokIcon: ProviderIcon; declare const TwitchIcon: ProviderIcon; declare const VKIcon: ProviderIcon; declare const XIcon: ProviderIcon; declare const ZoomIcon: ProviderIcon; type FieldType = "string" | "number" | "boolean"; interface AdditionalField { description?: ReactNode; instructions?: ReactNode; label: ReactNode; placeholder?: string; required?: boolean; type: FieldType; validate?: (value: string) => Promise<boolean>; } interface AdditionalFields { [key: string]: AdditionalField; } type AvatarOptions = { /** * Upload an avatar image and return the URL string * @remarks `(file: File) => Promise<string>` */ upload?: (file: File) => Promise<string | undefined | null>; /** * Avatar size for resizing * @default 128 (or 256 if upload is provided) */ size: number; /** * File extension for avatar uploads * @default "png" */ extension: string; }; type CaptchaProvider = "cloudflare-turnstile" | "google-recaptcha-v2-checkbox" | "google-recaptcha-v2-invisible" | "google-recaptcha-v3" | "hcaptcha"; type CaptchaOptions = { /** * Captcha site key */ siteKey: string; /** * Captcha provider type */ provider: CaptchaProvider; /** * Hide the captcha badge * @default false */ hideBadge?: boolean; /** * Use recaptcha.net domain instead of google.com * @default false */ recaptchaNet?: boolean; /** * Enable enterprise mode for Google reCAPTCHA * @default false */ enterprise?: boolean; /** * Overrides the default array of paths where captcha validation is enforced * @default ["/sign-up/email", "/sign-in/email", "/forget-password"] */ endpoints?: string[]; }; type CredentialsOptions = { /** * Enable or disable the Confirm Password input * @default false */ confirmPassword?: boolean; /** * Enable or disable Forgot Password flow * @default true */ forgotPassword?: boolean; /** * Customize the password validation */ passwordValidation?: PasswordValidation; /** * Enable or disable Remember Me checkbox * @default false */ rememberMe?: boolean; /** * Enable or disable Username support * @default false */ username?: boolean; }; type DeleteUserOptions = { /** * Enable or disable email verification for account deletion * @default undefined */ verification?: boolean; }; declare const socialProviders: readonly [{ readonly provider: "apple"; readonly name: "Apple"; readonly icon: ProviderIcon; }, { readonly provider: "discord"; readonly name: "Discord"; readonly icon: ProviderIcon; }, { readonly provider: "dropbox"; readonly name: "Dropbox"; readonly icon: ProviderIcon; }, { readonly provider: "facebook"; readonly name: "Facebook"; readonly icon: ProviderIcon; }, { readonly provider: "github"; readonly name: "GitHub"; readonly icon: ProviderIcon; }, { readonly provider: "gitlab"; readonly name: "GitLab"; readonly icon: ProviderIcon; }, { readonly provider: "google"; readonly name: "Google"; readonly icon: ProviderIcon; }, { readonly provider: "kick"; readonly name: "Kick"; readonly icon: ProviderIcon; }, { readonly provider: "linkedin"; readonly name: "LinkedIn"; readonly icon: ProviderIcon; }, { readonly provider: "microsoft"; readonly name: "Microsoft"; readonly icon: ProviderIcon; }, { readonly provider: "reddit"; readonly name: "Reddit"; readonly icon: ProviderIcon; }, { readonly provider: "roblox"; readonly name: "Roblox"; readonly icon: ProviderIcon; }, { readonly provider: "spotify"; readonly name: "Spotify"; readonly icon: ProviderIcon; }, { readonly provider: "tiktok"; readonly name: "TikTok"; readonly icon: ProviderIcon; }, { readonly provider: "twitch"; readonly name: "Twitch"; readonly icon: ProviderIcon; }, { readonly provider: "vk"; readonly name: "VK"; readonly icon: ProviderIcon; }, { readonly provider: "twitter"; readonly name: "X"; readonly icon: ProviderIcon; }, { readonly provider: "zoom"; readonly name: "Zoom"; readonly icon: ProviderIcon; }]; type Provider = { provider: string; name: string; icon?: ProviderIcon; }; type GenericOAuthOptions = { /** * Custom OAuth Providers * @default [] */ providers: Provider[]; /** * Custom generic OAuth sign in function */ signIn?: (params: Parameters<AuthClient["signIn"]["oauth2"]>[0]) => Promise<unknown>; }; type GravatarOptions = { /** * Default image type or URL * Options: '404', 'mp', 'identicon', 'monsterid', 'wavatar', 'retro', 'robohash', 'blank', or custom URL */ d?: string; /** * Image size in pixels (1-2048) */ size?: number; /** * Whether to append .jpg extension to the hash * @default false */ jpg?: boolean; /** * Force default image even if user has Gravatar * @default false */ forceDefault?: boolean; }; type Link = ComponentType<{ href: string; className?: string; children: ReactNode; }>; type OrganizationLogoOptions = { /** * Upload a logo image and return the URL string * @remarks `(file: File) => Promise<string>` */ upload?: (file: File) => Promise<string | undefined | null>; /** * Logo size for resizing * @default 256 if upload is provided, 128 otherwise */ size: number; /** * File extension for logo uploads * @default "png" */ extension: string; }; type OrganizationOptions = { /** * Logo configuration * @default undefined */ logo?: boolean | Partial<OrganizationLogoOptions>; /** * Custom roles to add to the built-in roles (owner, admin, member) * @default [] */ customRoles?: Array<{ role: string; label: string; }>; }; type OrganizationOptionsContext = { /** * Logo configuration * @default undefined */ logo?: OrganizationLogoOptions; /** * Custom roles to add to the built-in roles (owner, admin, member) * @default [] */ customRoles: Array<{ role: string; label: string; }>; }; type ToastVariant = "default" | "success" | "error" | "info" | "warning"; type RenderToast = ({ variant, message }: { variant?: ToastVariant; message?: string; }) => void; type SettingsOptions = { /** * Custom Settings URL */ url?: string; /** * Array of fields to show in `<SettingsCards />` * @default ["image", "name"] */ fields: string[]; }; type SignUpOptions = { /** * Array of fields to show in Sign Up form * @default ["name"] */ fields?: string[]; }; type SocialOptions = { /** * Array of Social Providers to enable * @remarks `SocialProvider[]` */ providers: SocialProvider[]; /** * Custom social sign in function */ signIn?: (params: Parameters<AuthClient["signIn"]["social"]>[0]) => Promise<unknown>; }; declare const defaultNavigate: (href: string) => void; declare const defaultReplace: (href: string) => void; type AuthUIContextType = { authClient: AuthClient; /** * Additional fields for users */ additionalFields?: AdditionalFields; /** * API Key plugin configuration */ apiKey?: { /** * Prefix for API Keys */ prefix?: string; /** * Metadata for API Keys */ metadata?: Record<string, unknown>; } | boolean; /** * Avatar configuration * @default undefined */ avatar?: AvatarOptions; /** * Base path for the auth views * @default "/auth" */ basePath: string; /** * Front end base URL for auth API callbacks */ baseURL?: string; /** * Captcha configuration */ captcha?: CaptchaOptions; credentials?: CredentialsOptions; /** * Default redirect URL after authenticating * @default "/" */ redirectTo: string; /** * Enable or disable user change email support * @default true */ changeEmail?: boolean; /** * User Account deletion configuration * @default undefined */ deleteUser?: DeleteUserOptions; /** * Show Verify Email card for unverified emails */ emailVerification?: boolean; /** * Freshness age for Session data * @default 60 * 60 * 24 */ freshAge: number; /** * Generic OAuth provider configuration */ genericOAuth?: GenericOAuthOptions; /** * Gravatar configuration */ gravatar?: boolean | GravatarOptions; hooks: AuthHooks; localization: AuthLocalization; /** * Enable or disable Magic Link support * @default false */ magicLink?: boolean; /** * Enable or disable Email OTP support * @default false */ emailOTP?: boolean; /** * Enable or disable Multi Session support * @default false */ multiSession?: boolean; mutators: AuthMutators; /** * Whether the name field should be required * @default true */ nameRequired?: boolean; /** * Enable or disable One Tap support * @default false */ oneTap?: boolean; /** * Perform some User updates optimistically * @default false */ optimistic?: boolean; organization?: OrganizationOptionsContext; /** * Enable or disable Passkey support * @default false */ passkey?: boolean; /** * Forces better-auth-tanstack to refresh the Session on the auth callback page * @default false */ persistClient?: boolean; settings?: SettingsOptions; /** * Sign Up configuration */ signUp?: SignUpOptions; /** * Social provider configuration */ social?: SocialOptions; toast: RenderToast; /** * Enable or disable two-factor authentication support * @default undefined */ twoFactor?: ("otp" | "totp")[]; viewPaths: AuthViewPaths; /** * Navigate to a new URL * @default window.location.href */ navigate: typeof defaultNavigate; /** * Called whenever the Session changes */ onSessionChange?: () => void | Promise<void>; /** * Replace the current URL * @default navigate */ replace: typeof defaultReplace; /** * Custom Link component for navigation * @default <a> */ Link: Link; }; type AuthUIProviderProps = { children: ReactNode; /** * Better Auth client returned from createAuthClient * @default Required * @remarks `AuthClient` */ authClient: AnyAuthClient; /** * Avatar configuration * @default undefined */ avatar?: boolean | Partial<AvatarOptions>; /** * @deprecated use avatar.extension instead */ avatarExtension?: string; /** * @deprecated use avatar.size instead */ avatarSize?: number; /** * @deprecated use deleteUser.verification instead */ deleteAccountVerification?: boolean; /** * User Account deletion configuration * @default undefined */ deleteUser?: DeleteUserOptions | boolean; /** * ADVANCED: Custom hooks for fetching auth data */ hooks?: Partial<AuthHooks>; /** * Settings configuration * @default { fields: ["image", "name"] } */ settings?: boolean | Partial<SettingsOptions>; /** * @deprecated use settings.fields instead */ settingsFields?: string[]; /** * @deprecated use settings.url instead */ settingsURL?: string; /** * Customize the paths for the auth views * @default authViewPaths * @remarks `AuthViewPaths` */ viewPaths?: Partial<AuthViewPaths>; /** * Render custom Toasts * @default Sonner */ toast?: RenderToast; /** * Customize the Localization strings * @default authLocalization * @remarks `AuthLocalization` */ localization?: AuthLocalization; /** * ADVANCED: Custom mutators for updating auth data */ mutators?: Partial<AuthMutators>; /** * @deprecated use social.providers instead */ providers?: SocialProvider[]; /** * Organization plugin configuration */ organization?: OrganizationOptions | boolean; /** * @deprecated use genericOAuth.providers instead */ otherProviders?: Provider[]; /** * @deprecated use social.signIn instead */ signInSocial?: (params: Parameters<AuthClient["signIn"]["social"]>[0]) => Promise<unknown>; /** * Enable or disable Credentials support * @default { forgotPassword: true } */ credentials?: boolean | CredentialsOptions; /** * @deprecated use credentials.confirmPassword instead */ confirmPassword?: boolean; /** * @deprecated use credentials.forgotPassword instead */ forgotPassword?: boolean; /** * @deprecated use credentials.passwordValidation instead */ passwordValidation?: PasswordValidation; /** * @deprecated use credentials.rememberMe instead */ rememberMe?: boolean; /** * @deprecated use avatar.upload instead */ uploadAvatar?: (file: File) => Promise<string | undefined | null>; /** * @deprecated use credentials.username instead */ username?: boolean; /** * Enable or disable Sign Up form * @default { fields: ["name"] } */ signUp?: SignUpOptions | boolean; /** * @deprecated use signUp.fields instead */ signUpFields?: string[]; } & Partial<Omit<AuthUIContextType, "authClient" | "viewPaths" | "localization" | "mutators" | "toast" | "hooks" | "avatar" | "settings" | "deleteUser" | "credentials" | "signUp" | "organization">>; declare const AuthUIContext: React.Context<AuthUIContextType>; declare const AuthUIProvider: ({ children, authClient: authClientProp, avatar: avatarProp, settings: settingsProp, settingsFields, settingsURL, avatarExtension, avatarSize, deleteUser: deleteUserProp, deleteAccountVerification, social: socialProp, genericOAuth: genericOAuthProp, providers, otherProviders, signInSocial, basePath, baseURL, captcha, redirectTo, credentials: credentialsProp, confirmPassword, forgotPassword, passwordValidation, rememberMe, username, changeEmail, freshAge, hooks: hooksProp, mutators: mutatorsProp, localization: localizationProp, nameRequired, organization: organizationProp, signUp: signUpProp, signUpFields, toast, viewPaths: viewPathsProp, navigate, replace, uploadAvatar, Link, ...props }: AuthUIProviderProps) => react_jsx_runtime.JSX.Element; export { type AuthUIProviderProps as A, DiscordIcon as D, type FieldType as F, GitHubIcon as G, KickIcon as K, LinkedInIcon as L, MicrosoftIcon as M, type PasswordValidation as P, RedditIcon as R, SpotifyIcon as S, TikTokIcon as T, VKIcon as V, XIcon as X, ZoomIcon as Z, type AuthLocalization as a, type ProviderIconProps as b, type ProviderIcon as c, AppleIcon as d, DropboxIcon as e, FacebookIcon as f, GitLabIcon as g, GoogleIcon as h, RobloxIcon as i, TwitchIcon as j, authLocalization as k, type AuthUIContextType as l, AuthUIContext as m, AuthUIProvider as n, type Provider as o, socialProviders as s };