Neutrino Docs
SDK Reference

@neutrino-io/ui-auth

API reference for @neutrino-io/ui-auth

Exports

SymbolKindTypeDescription
AuthProviderFunction({ children, config, featuresConfig, navigationConfig, }: AuthProviderProps) =\> import("@types/react/jsx-runtime").JS...
useAuthVariable() =\> AuthContextType
useAuthConfigVariable() =\> ResolvedAuthConfig | null
useAuthFeatureVariable(feature: string) =\> boolean | { google?: boolean; github?: boolean; apple?: boolean; }
useAuthEnvironmentVariable() =\> import("packages/ui-auth/src/client").AuthEnvironmentConfig | null
useFormAuthFunction(options?: UseFormAuthOptions) =\> UseFormAuthReturnHook for standardized authentication form handling
Provides consistent error handling, loading states, and auth actions
getErrorDisplayPropsVariable(error: string | null) =\> AuthErrorDisplayProps
getButtonPropsVariable(isLoading: boolean, loadingText?: string, disabled?: boolean) =\> { disabled: boolean; children: string | undefined; }
authValidationSchemasVariable{ email: { required: string; format: string; }; password: { required: string; minLength: (min: number) =\> string; com...
standardAuthFieldsVariable{ readonly email: { readonly name: "email"; readonly label: "Email"; readonly type: "email"; readonly placeholder: "n...
FormAuthStateInterfaceFormAuthState
FormAuthActionsInterfaceFormAuthActions
UseFormAuthOptionsInterfaceUseFormAuthOptions
UseFormAuthReturnInterfaceUseFormAuthReturn
AuthErrorDisplayPropsInterfaceAuthErrorDisplayPropsStandard error display component props
AuthButtonPropsInterfaceAuthButtonPropsStandard loading button props
StandardFieldConfigInterfaceStandardFieldConfigStandard form field configuration
resolveAuthConfigFunction(baseConfig: AuthConfig) =\> ResolvedAuthConfigEnhanced configuration resolver with three-provider support
mergeAuthConfigFunction(baseConfig: AuthConfig, overrides: Partial\<AuthConfig\>) =\> AuthConfigMerge base configuration with overrides (for direct config merging)
Enhanced for new configuration structure
validateAuthConfigFunction(config: AuthConfig) =\> ValidationResultMain configuration validation function
getCurrentEnvironmentFunction() =\> "development" | "production" | "test"Get current environment with enhanced detection
getEnvironmentOverridesFunction() =\> AuthEnvironmentOverridesGet environment overrides with comprehensive variable support
ConfigValidationErrorClassConfigValidationError
isValidConfigFunction(config: AuthConfig) =\> booleanHelper function to check if configuration is valid
validateAndThrowFunction(config: AuthConfig, environment?: string) =\> voidValidate configuration and throw if invalid in production
ValidationResultInterfaceValidationResult
parseBooleanFunction(value: string | undefined, defaultValue?: boolean) =\> booleanParse boolean values from environment variables
parseNumberFunction(value: string | undefined, defaultValue?: number) =\> numberParse number values from environment variables
parseJSONFunction\<T\>(value: string | undefined, defaultValue?: T) =\> T | undefinedParse JSON values from environment variables
parseArrayFunction(value: string | undefined, delimiter?: string) =\> string[]Parse array values from comma-separated strings
inspectEnvironmentVariablesFunction() =\> voidDevelopment helper to check environment variable availability
validateRequiredEnvironmentVariablesFunction(provider: AuthProvider) =\> string[]Validate required environment variables for specific providers
ConfigInspectorClassConfigInspector
inspectAuthConfigFunction(config: ResolvedAuthConfig) =\> voidDevelopment helper to inspect auth configuration
getConfigSummaryFunction(config: ResolvedAuthConfig) =\> stringGet configuration summary for debugging
validateConfigWithFeedbackFunction(config: ResolvedAuthConfig) =\> { isValid: boolean; issues: string[]; suggestions: string[]; }Validate configuration and provide detailed feedback
ConfigInspectionResultInterfaceConfigInspectionResult
createAuthProviderFunction(config: ResolvedAuthConfig) =\> Promise\<AuthProvider\>Create auth provider based on resolved configuration
createAuthProviderFromConfigFunction(baseConfig: AuthConfig) =\> Promise\<AuthProvider\>Create auth provider from base configuration (with environment resolution)
switchProviderInDevelopmentFunction(provider: string) =\> voidDevelopment helper to switch provider at runtime
getAvailableProvidersFunction() =\> string[]Get available providers
validateProviderConfigFunction(providerType: string, config: Record\<string, unknown\>) =\> booleanValidate provider configuration
AuthGuardVariableReact.FC\<AuthGuardProps\>
LoadingStateVariableReact.FC\<LoadingStateProps\>
PermissionGateVariableReact.FC\<PermissionGateProps\>
AuthPromptVariableReact.FC\<AuthPromptProps\>
ErrorBoundaryClassErrorBoundaryErrorBoundary component with modern error handling
withAuthGuardVariable\<P extends object\>(Component: React.ComponentType\<P\>, config: AuthGuardProps["config"]) =\> React.ForwardRefExoticComp...
RequireAuthVariableReact.FC\<{ children: React.ReactNode; redirectTo?: string; fallback?: React.ReactNode; }\>
RequirePermissionsVariableReact.FC\<{ children: React.ReactNode; permissions: string[]; mode?: "any" | "all" | "exact"; redirectTo?: string; }\>
RequireRolesVariableReact.FC\<{ children: React.ReactNode; roles: string[]; mode?: "any" | "all" | "exact"; redirectTo?: string; }\>
PublicRouteVariableReact.FC\<{ children: React.ReactNode; }\>
useAuthGuardVariable(config: AuthGuardConfig) =\> UseAuthGuardReturn
useSimpleAuthGuardVariable(requiresAuth?: boolean) =\> UseAuthGuardReturn
usePermissionGuardVariable(permissions: string[], mode?: "any" | "all" | "exact") =\> UseAuthGuardReturn
useRoleGuardVariable(roles: string[], mode?: "any" | "all" | "exact") =\> UseAuthGuardReturn
useRouteProtectionVariable(routes?: RouteProtectionConfig[]) =\> UseRouteProtectionReturn
useCurrentRouteProtectionVariable(config: Omit\<RouteProtectionConfig, "path"\>, getCurrentPath?: () =\> string) =\> { routeConfig: RouteProtectionConfig ...
useAuthRedirectVariable(config?: RedirectConfig) =\> UseAuthRedirectReturn
useAutoAuthRedirectVariable(config?: RedirectConfig & { redirectWhenUnauthenticated?: boolean; redirectWhenAuthenticated?: boolean; skipInitialR...
withRouteProtectionVariable\<P extends object\>(Component: React.ComponentType\<P\>, config: Omit\<RouteProtectionConfig, "path"\>) =\> React.ForwardRe...
ProtectedRouteVariableReact.FC\<{ children: React.ReactNode; config: Omit\<RouteProtectionConfig, "path"\>; fallback?: React.ReactNode; }\>
RouteProtectionProviderVariableReact.FC\<{ children: React.ReactNode; defaultRoutes?: RouteProtectionConfig[]; }\>
AuthRedirectVariableReact.FC\<{ config: RedirectConfig; when: "authenticated" | "unauthenticated" | "always"; children?: React.ReactNode; }\>
detectRouterVariable() =\> Promise\<RouterPlugin\>
createNavigatorVariable() =\> Promise\<AuthNavigator\>
getAvailableRoutersVariable() =\> RouterPlugin[]
registerRouterPluginVariable(plugin: RouterPlugin) =\> void
getRouterByNameVariable(name: string) =\> RouterPlugin | undefined
getDefaultNavigatorVariable() =\> Promise\<AuthNavigator\>
navigateToVariable(to: string, options?: NavigationOptions) =\> Promise\<void\>
buildRouteVariable(path: string, params?: Record\<string, any\>) =\> Promise\<string\>
getCurrentRouteVariable() =\> Promise\<string\>
decodeTokenFunction(token: string) =\> TokenPayload | nullDecode JWT token payload (without verification)
Warning: This does not verify the token signature
isTokenExpiredFunction(token: string) =\> booleanCheck if token is expired
getTimeUntilExpiryFunction(token: string) =\> numberGet time until token expires (in milliseconds)
needsRefreshFunction(token: string, thresholdMs?: number) =\> booleanCheck if token needs refresh (within threshold)
getUserIdFromTokenFunction(token: string) =\> string | nullExtract user ID from token
getUserRoleFromTokenFunction(token: string) =\> string | nullExtract user role from token
getPermissionsFromTokenFunction(token: string) =\> string[]Extract permissions from token
isValidTokenFormatFunction(token: string) =\> booleanValidate token format (basic check)
createMockTokenFunction(payload: Partial\<TokenPayload\>) =\> stringCreate a mock token for testing
cleanTokenFunction(token: string) =\> stringClean token (remove Bearer prefix if present)
addBearerPrefixFunction(token: string) =\> stringAdd Bearer prefix to token
createStorageAdapterFunction(type: StorageType) =\> StorageAdapterCreate storage adapter based on type
SecureStorageClassSecureStorageSecure storage for sensitive auth data
validateRedirectUrlFunction(url: string, options?: UrlValidationOptions) =\> booleanValidates a redirect URL to prevent open redirect attacks
buildSafeRedirectUrlFunction(baseUrl: string, redirectUrl?: string, options?: UrlValidationOptions) =\> stringBuilds a safe redirect URL with validation
extractSafeRedirectUrlFunction(searchParams: URLSearchParams | string, paramName?: string, options?: UrlValidationOptions) =\> string | nullExtracts and validates a redirect URL from query parameters
UrlValidationOptionsInterfaceUrlValidationOptionsURL validation utility to prevent open redirect vulnerabilities
Provides secure validation of redirect URLs
useSimpleLoadingFunction(loading: boolean, options?: SimpleLoadingOptions) =\> booleanSimple hook for delayed loading states
Shows loading after a delay to prevent flickering
SimpleLoadingOptionsInterfaceSimpleLoadingOptions
ClerkAuthProviderClassClerkAuthProvider
ClerkBridgeProviderFunction({ children, provider, }: ClerkBridgeProviderProps) =\> import("@types/react/jsx-runtime").JSX.ElementReact component that bridges Clerk hooks with the auth provider
This component gracefully handles when ClerkProvider context is not yet available
useClerkAuthProviderFunction(config: ClerkProviderConfig) =\> ClerkAuthProviderHook to create and manage a Clerk auth provider instance
BetterAuthProviderClassBetterAuthProvider
createBrowserAuthClientFunction(baseURL?: string) =\> BetterAuthClientInstance
BetterAuthConfigInterfaceBetterAuthConfigBetter Auth Specific Types
Type definitions for Better Auth configuration and data structures
BetterAuthUserInterfaceBetterAuthUser
BetterAuthSessionInterfaceBetterAuthSession
UnifiedSettingsAuthAdapterClassUnifiedSettingsAuthAdapterAdapter that implements SettingsAuthProvider using a AuthProvider
This bridges the unified auth system with the existing UI package settings auth interface
createSettingsAuthAdapterFunction(authProvider: AuthProvider) =\> UnifiedSettingsAuthAdapterFactory function to create a UnifiedSettingsAuthAdapter
isSettingsAuthProviderFunction(obj: unknown) =\> obj is SettingsAuthProviderType guard to check if an object implements SettingsAuthProvider
SSOCallbackFunction({ type, redirectUrl, onSuccess, onError, }: SSOCallbackProps) =\> import("@types/react/jsx-runtime").JSX.ElementSSOCallback - Unified SSO redirect handler

This component handles OAuth/SSO redirects for all auth providers. Uses the generic callback handler for all providers (native Clerk components removed). Provider-specific logic is handled through the unified provider interface. | | SSOCallbackDefault | Function | ({ type, redirectUrl, onSuccess, onError, }: SSOCallbackProps) =\> import("@types/react/jsx-runtime").JSX.Element | SSOCallback - Unified SSO redirect handler

This component handles OAuth/SSO redirects for all auth providers. Uses the generic callback handler for all providers (native Clerk components removed). Provider-specific logic is handled through the unified provider interface. | | AppSidebar | Function | ({ data, onUserLogout, onTeamSelect, onCreateTeam, isLoading, customUserActions, userRoutes, LinkComponent, ...props ... | | | TeamSwitcher | Function | ({ teams, onTeamSelect, onCreateTeam, isLoading, }: TeamSwitcherProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | NavUser | Function | (props: NavUserProps) =\> import("@types/react/jsx-runtime").JSX.Element | Public export — wraps inner component with AuthContextBoundary. | | SSOCallbackProps | Interface | SSOCallbackProps | | | ClerkAuthProviderWrapper | Function | ({ children, config, ui, }: ClerkProviderProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | DirectusAuthProvider | Function | ({ children, config, ui, }: DirectusProviderProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | DynamicAuthProvider | Function | ({ children, config, }: DynamicAuthProviderProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | SwitchableAuthProvider | Function | ({ children, defaultProvider, configs, ui, }: SwitchableAuthProviderProps) =\> import("@types/react/jsx-runtime").JSX.... | | | EnvironmentAuthProvider | Function | ({ children, development, production, test, }: EnvironmentAuthProviderProps) =\> import("@types/react/jsx-runtime").JS... | | | switchAuthProviderInDev | Variable | (provider: "default" \| "clerk" \| "directus") =\> void | | | AuthPage | Function | ({ type, config: userConfig, onSuccess, onError, className, }: AuthPageProps) =\> import("@types/react/jsx-runtime").J... | AuthPage - Complete authentication page composition

Responsibilities:

  • Combines layout and form components based on configuration
  • Handles provider detection and form routing
  • Applies environment variable overrides
  • Provides error boundaries and fallback handling
  • Maintains consistent styling and behavior

Note: ClerkProvider is now handled at the AuthProvider level for proper context sharing | | DeviceActivatePage | Function | () =\> import("@types/react/jsx-runtime").JSX.Element | | | AuthSplitLayout | Function | ({ config, formType, formComponent, brandingComponent, className, }: AuthSplitLayoutProps) =\> import("@types/react/js... | AuthSplitLayout - Two-column split layout inspired by shadcn/ui login-02

Structure (reversed from login-02):

  • Left Panel: Branding/cover content with dark gradient background (50%)
  • Right Panel: Form content with light background (50%)

Responsive behavior:

  • Desktop: Side-by-side 50/50 split, full viewport height
  • Mobile: Stacked, branding hidden or overlaid | | AuthBrandingPanel | Function | ({ config, formType, className, }: AuthBrandingPanelProps) =\> import("@types/react/jsx-runtime").JSX.Element | AuthBrandingPanel - Content renderer for branding within assigned panel

Responsibilities:

  • Renders logo, title, testimonials within its assigned panel
  • Controls content positioning (top, center, bottom within panel)
  • Handles dynamic content (different testimonials for sign-in vs sign-up)
  • Provides configurable branding elements | | AuthCardLayout | Function | ({ config, branding, children, className, }: AuthCardLayoutProps) =\> import("@types/react/jsx-runtime").JSX.Element | AuthCardLayout - shadcn/ui login-03 inspired layout

Responsibilities:

  • Provides centered form container with company branding
  • Clean muted background with flexbox layout
  • Responsive padding and spacing | | AuthMinimalLayout | Function | ({ children, formType, branding, className, }: AuthMinimalLayoutProps) =\> import("@types/react/jsx-runtime").JSX.Element | AuthMinimalLayout - shadcn/ui login-05 inspired minimal layout

Responsibilities:

  • Provides clean minimal layout with header branding
  • Follows login-05 structure with logo and title at top
  • Responsive design with proper spacing | | createLayoutComponent | Function | (layoutType: "split" \| "card" \| "minimal") =\> (({ config, formType, formComponent, brandingComponent, className, }: A... | | | defaultAuthUIConfig | Variable | AuthUIConfig | | | defaultSplitLayoutConfig | Variable | SplitLayoutConfig | | | defaultCardLayoutConfig | Variable | CardLayoutConfig | | | defaultBrandingConfig | Variable | BrandingConfig | | | mergeWithEnvironmentOverrides | Function | (baseConfig: AuthUIConfig, env: Record\<string, string \| undefined\>) =\> AuthUIConfig | | | validateAuthUIConfig | Function | (config: AuthUIConfig) =\> { isValid: boolean; errors: string[]; } | | | SignInFeature | Function | () =\> import("@types/react/jsx-runtime").JSX.Element | | | SignUpFeature | Function | () =\> import("@types/react/jsx-runtime").JSX.Element | | | ForgotPasswordFeature | Function | () =\> import("@types/react/jsx-runtime").JSX.Element | | | OTPFeature | Function | ({ className, redirectUrl, onSuccess, onError, showTrustDevice, autoSubmit, resendEnabled, localization, classNames, ... | Unified OTP Form Component Layout-agnostic form for two-factor authentication OTP verification Integrates with Better Auth twoFactor plugin | | authUIVersion | Variable | "1.0.0" | | | AuthUIConfig | Interface | AuthUIConfig | | | SplitLayoutConfig | Interface | SplitLayoutConfig | | | CardLayoutConfig | Interface | CardLayoutConfig | | | BrandingConfig | Interface | BrandingConfig | | | LogoConfig | Interface | LogoConfig | | | TitleConfig | Interface | TitleConfig | | | ContentConfig | Interface | ContentConfig | | | TestimonialData | Interface | TestimonialData | | | AuthFormType | Type | AuthFormType | | | AuthFormProps | Interface | AuthFormProps | | | AuthLayoutProps | Interface | AuthLayoutProps | | | AuthBrandingPanelProps | Interface | AuthBrandingPanelProps | | | ResetPasswordForm | Function | ({ className, onSuccess, onError, localization, classNames, }: ResetPasswordFormProps) =\> import("@types/react/jsx-ru... | | | TwoFactorSetupCard | Function | ({ className, onComplete, onError, localization, }: TwoFactorSetupCardProps) =\> import("@types/react/jsx-runtime").JS... | | | QRCodeDisplay | Function | ({ totpURI, secret, className, }: QRCodeDisplayProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | BackupCodesDisplay | Function | ({ codes, className, }: BackupCodesDisplayProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | EmailVerificationPending | Function | ({ email, className, localization, }: EmailVerificationPendingProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | EmailVerificationCallback | Function | ({ className, onSuccess, onError, localization, }: EmailVerificationCallbackProps) =\> import("@types/react/jsx-runtim... | | | EmailVerificationBanner | Function | () =\> import("@types/react/jsx-runtime").JSX.Element \| null | Persistent banner shown to signed-in users whose email is not yet verified. Renders nothing once the user's emailVerified flag is true or they dismiss it. | | AuthContextBoundary | Class | AuthContextBoundary | AuthContextBoundary — catches ONLY auth context errors.

Catches all errors in getDerivedStateFromError, then differentiates in componentDidCatch: auth context errors render the fallback, non-auth errors are re-thrown during render so parent boundaries catch them. | | SocialProviderSection | Function | ({ providers, action, onProviderClick, loadingProvider, disabled, localization, classNames, }: { providers: SocialPro... | | | useSocialAuth | Function | (options: { action: "sign-in" \| "sign-up"; redirectUrl?: string; onSuccess?: () =\> void; onError?: (error: Error) =\> ... | | | ChangePasswordCard | Function | ({ className, classNames, onSuccess, onError, revokeOtherSessions, localization, }: ChangePasswordCardProps) =\> impor... | | | ChangeEmailCard | Function | ({ className, classNames, onSuccess, onError, localization, }: ChangeEmailCardProps) =\> import("@types/react/jsx-runt... | | | ActiveSessionsCard | Function | ({ className, classNames, onSuccess, onError, onSessionRevoked, localization, }: ActiveSessionsCardProps) =\> import("... | | | TwoFactorSettingsCard | Function | ({ className, classNames, onSuccess, onError, onEnabled, onDisabled, localization, }: TwoFactorSettingsCardProps) =\> ... | | | DeleteAccountCard | Function | ({ className, classNames, onSuccess, onError, confirmationPhrase, requirePassword, redirectTo, localization, }: Delet... | | | SecuritySettingsCards | Function | ({ classNames, className, gapClassName, onSuccess, onError, }: SecuritySettingsCardsProps) =\> import("@types/react/js... | | | AccountSettingsCards | Function | ({ classNames, className, gapClassName, onSuccess, onError, deleteConfirmationPhrase, deleteRequirePassword, deleteRe... | | | accountSettingsConfig | Variable | { minPasswordLength: number; defaultConfirmationPhrase: string; deleteRedirectTo: string; } | | | SettingsCardProps | Interface | SettingsCardProps | | | SettingsCardClassNames | Interface | SettingsCardClassNames | Shared types for account settings cards Follows better-auth-ui SettingsCardClassNames pattern | | AuthSession | Interface | AuthSession | | | AuthFormSkeleton | Function | ({ className }: { className?: string; }) =\> import("@types/react/jsx-runtime").JSX.Element | Skeleton for auth form layouts (sign-in, sign-up, etc.) | | AuthCardSkeleton | Function | ({ className }: { className?: string; }) =\> import("@types/react/jsx-runtime").JSX.Element | Skeleton for settings card layouts | | SessionListSkeleton | Function | ({ count, className, }: { count?: number; className?: string; }) =\> import("@types/react/jsx-runtime").JSX.Element | Skeleton for session list | | AuthLocalizationProvider | Function | ({ localization, children, }: AuthLocalizationProviderProps) =\> import("@types/react/jsx-runtime").JSX.Element | Provides localization overrides to all auth components in the tree.

Deep-merges the provided localization object over defaultLocalization. Components outside this provider fall back to English defaults. | | useLocalization | Function | (componentOverride?: DeepPartial\<AuthLocalization\>) =\> AuthLocalization | Returns the fully-resolved AuthLocalization object.

Priority (highest to lowest):

  1. componentOverride prop — deepMerged on top of context value
  2. Context value from AuthLocalizationProvider — deepMerged on top of defaults
  3. defaultLocalization — used when no provider is present

Always returns a complete AuthLocalization (never undefined). | | resolveTemplate | Function | (template: string, vars: Record\<string, string \| number\>) =\> string | Replaces {key} placeholders in a template string with runtime values. | | defaultLocalization | Variable | AuthLocalization | | | AuthLocalization | Interface | AuthLocalization | All user-facing strings in | | DeepPartial | Type | DeepPartial\<T\> | Localization types for | | UserButton | Function | (props: UserButtonProps) =\> import("@types/react/jsx-runtime").JSX.Element | Standalone avatar dropdown component.

Displays a circular avatar button with the user's initials or image. On click, opens a dropdown with an optional custom menu, a settings link, and a sign-out button.

Wrapped in AuthContextBoundary — when auth context is absent a disabled generic avatar is rendered instead. | | SignedIn | Function | (props: SignedInProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | SignedOut | Function | (props: SignedOutProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | useOrganization | Function | () =\> UseOrganizationReturn | Hook to access the current user's active organization | | useOrganizationMembers | Function | () =\> UseOrganizationMembersReturn | Hook to manage organization members | | useOrganizationMutations | Function | () =\> UseOrganizationMutationsReturn | Hook for organization mutation operations | | useUserOrganizations | Function | () =\> UseUserOrganizationsReturn | Hook to fetch all organizations the current user is a member of

This is different from useOrganization() which only returns the active organization. This hook returns ALL organizations where the user has any role. | | OrganizationMembership | Interface | OrganizationMembership | | | UseUserOrganizationsReturn | Interface | UseUserOrganizationsReturn | | | useOrganizationRoles | Function | () =\> UseOrganizationRolesReturn | Hook to access organization roles | | useSettingsAuth | Function | () =\> SettingsAuthProvider | Hook to access settings authentication Provides abstracted auth interface that works with multiple providers | | useHasPermission | Function | () =\> (permission: string) =\> boolean | Hook to check if user has a specific permission.

SECURITY: Returns false (fail-safe) when the auth context is not yet loaded or the permission system is not configured. This prevents silent access grants when the SettingsAuthContextProvider is misconfigured or still initialising. | | useHasAnyPermission | Function | () =\> (permissions: string[]) =\> boolean | Hook to check if user has any of the specified permissions.

SECURITY: Returns false (fail-safe) when the auth context is not yet loaded or the permission system is not configured. | | useSettingsUser | Function | () =\> SettingsUser \| null | Hook to get current user information | | useAuthStatus | Function | () =\> { isLoaded: boolean; isSignedIn: boolean; user: SettingsUser \| null; } | Hook to check authentication status | | useUpdateProfile | Function | () =\> { updateUser: (data: Partial\<SettingsUser\>) =\> Promise\<void\>; updateMetadata: (metadata: Record\<string, unknown... | Hook for updating user profile information | | useHasOrganization | Function | () =\> boolean | Hook to check if user has an organization | | useOrganizationActions | Function | () =\> { createOrganization: (options: { name: string; }) =\> Promise\<{ id: string; name: string; }\>; switchOrganizatio... | Hook for organization management operations | | useAuthActions | Function | () =\> { signOut: () =\> Promise\<void\>; } | Hook for authentication actions (logout, etc.) | | SettingsAuthContextProvider | Variable | react.Provider\<SettingsAuthContextType \| null\> | | | AuthGuardConfig | Interface | AuthGuardConfig | Simplified Configuration API - provider-agnostic design | | AuthGuardProps | Interface | AuthGuardProps | Modern component props | | LoadingConfig | Interface | LoadingConfig | Loading configuration | | ErrorConfig | Interface | ErrorConfig | Error boundary configuration | | ModernRouterConfig | Interface | RouterConfig | Router configuration with auto-detection | | NavigationOptions | Interface | NavigationOptions | Navigation options | | PermissionRequirements | Interface | PermissionRequirements | Permission requirements | | RouterPlugin | Interface | RouterPlugin | Router plugin interface | | AuthNavigator | Interface | AuthNavigator | Unified navigator interface | | UseAuthGuardReturn | Interface | UseAuthGuardReturn | Hook return types | | RouteProtectionConfig | Interface | RouteProtectionConfig | Route protection configuration | | UseRouteProtectionReturn | Interface | UseRouteProtectionReturn | Route protection return type | | RedirectConfig | Interface | RedirectConfig | Redirect configuration | | RedirectReason | Type | RedirectReason | Redirect reasons | | UseAuthRedirectReturn | Interface | UseAuthRedirectReturn | Redirect hook return type | | OrganizationSwitcher | Function | (props: OrganizationSwitcherProps) =\> import("@types/react/jsx-runtime").JSX.Element | Standalone organization switcher dropdown.

Shows the currently active organization (or "Personal Account" when none is active). Opens a dropdown listing all of the user's organizations. Clicking an entry switches via provider.switchOrganization. An optional "Create Organization" item is shown at the bottom.

Wrapped in AuthContextBoundary — when auth context is absent a disabled placeholder button is rendered instead. | | AuthView | Function | ({ className, basePath, pathMap, layout, onSignIn, onSignUp, onError, redirectUrl, }: AuthViewProps) =\> import("@type... | AuthView — resolves the current auth view from window.location.pathname.

Steps:

  1. Strip basePath from the current pathname.
  2. Normalise the remaining segment (leading slash, trailing slash, query).
  3. Look up the segment in AUTH_PAGE_TYPES → render AuthPage. Then look up in SPECIAL_VIEWS → render the component directly. Fall back to sign-in.

No router dependency — reads window.location.pathname directly. | | AuthFormClassNames | Interface | AuthFormClassNames | | | FormAlert | Function | ({ message, onDismiss, className }: FormAlertProps) =\> import("@types/react/jsx-runtime").JSX.Element \| null | | | PasswordStrengthMeter | Function | ({ password, className, }: PasswordStrengthMeterProps) =\> import("@types/react/jsx-runtime").JSX.Element \| null | | | ValidatedInput | Function | ({ isValid, hasValue, showCheckmark, className, ...props }: ValidatedInputProps) =\> import("@types/react/jsx-runtime"... | | | StepIndicator | Function | ({ steps, currentStep, className, }: StepIndicatorProps) =\> import("@types/react/jsx-runtime").JSX.Element | | | getPasswordStrength | Function | (password: string) =\> PasswordStrength | | | PasswordStrength | Interface | PasswordStrength | | | usePlatformSession | Function | () =\> PlatformSessionResult | | | PlatformSessionResult | Interface | PlatformSessionResult | | | version | Variable | "0.1.0" | | | authRouteManifest | Variable | RouteManifest | | | SignIn | Function | () =\> import("@types/react/jsx-runtime").JSX.Element | Main SignIn component with provider-agnostic support | | SignUp | Function | () =\> import("@types/react/jsx-runtime").JSX.Element | Main SignUp component with provider-agnostic support | | authFeatureDefinition | Variable | FeatureDefinition | | | signInFeatureConfig | Variable | { routes: { path: string; component: string; }[]; sidebarItems: never[]; permissions: never[]; } | | | signUpFeatureConfig | Variable | { routes: { path: string; component: string; }[]; sidebarItems: never[]; permissions: never[]; } | |

On this page