@neutrino-io/ui-auth
API reference for @neutrino-io/ui-auth
Exports
| Symbol | Kind | Type | Description |
|---|---|---|---|
AuthProvider | Function | ({ children, config, featuresConfig, navigationConfig, }: AuthProviderProps) =\> import("@types/react/jsx-runtime").JS... | |
useAuth | Variable | () =\> AuthContextType | |
useAuthConfig | Variable | () =\> ResolvedAuthConfig | null | |
useAuthFeature | Variable | (feature: string) =\> boolean | { google?: boolean; github?: boolean; apple?: boolean; } | |
useAuthEnvironment | Variable | () =\> import("packages/ui-auth/src/client").AuthEnvironmentConfig | null | |
useFormAuth | Function | (options?: UseFormAuthOptions) =\> UseFormAuthReturn | Hook for standardized authentication form handling |
| Provides consistent error handling, loading states, and auth actions | |||
getErrorDisplayProps | Variable | (error: string | null) =\> AuthErrorDisplayProps | |
getButtonProps | Variable | (isLoading: boolean, loadingText?: string, disabled?: boolean) =\> { disabled: boolean; children: string | undefined; } | |
authValidationSchemas | Variable | { email: { required: string; format: string; }; password: { required: string; minLength: (min: number) =\> string; com... | |
standardAuthFields | Variable | { readonly email: { readonly name: "email"; readonly label: "Email"; readonly type: "email"; readonly placeholder: "n... | |
FormAuthState | Interface | FormAuthState | |
FormAuthActions | Interface | FormAuthActions | |
UseFormAuthOptions | Interface | UseFormAuthOptions | |
UseFormAuthReturn | Interface | UseFormAuthReturn | |
AuthErrorDisplayProps | Interface | AuthErrorDisplayProps | Standard error display component props |
AuthButtonProps | Interface | AuthButtonProps | Standard loading button props |
StandardFieldConfig | Interface | StandardFieldConfig | Standard form field configuration |
resolveAuthConfig | Function | (baseConfig: AuthConfig) =\> ResolvedAuthConfig | Enhanced configuration resolver with three-provider support |
mergeAuthConfig | Function | (baseConfig: AuthConfig, overrides: Partial\<AuthConfig\>) =\> AuthConfig | Merge base configuration with overrides (for direct config merging) |
| Enhanced for new configuration structure | |||
validateAuthConfig | Function | (config: AuthConfig) =\> ValidationResult | Main configuration validation function |
getCurrentEnvironment | Function | () =\> "development" | "production" | "test" | Get current environment with enhanced detection |
getEnvironmentOverrides | Function | () =\> AuthEnvironmentOverrides | Get environment overrides with comprehensive variable support |
ConfigValidationError | Class | ConfigValidationError | |
isValidConfig | Function | (config: AuthConfig) =\> boolean | Helper function to check if configuration is valid |
validateAndThrow | Function | (config: AuthConfig, environment?: string) =\> void | Validate configuration and throw if invalid in production |
ValidationResult | Interface | ValidationResult | |
parseBoolean | Function | (value: string | undefined, defaultValue?: boolean) =\> boolean | Parse boolean values from environment variables |
parseNumber | Function | (value: string | undefined, defaultValue?: number) =\> number | Parse number values from environment variables |
parseJSON | Function | \<T\>(value: string | undefined, defaultValue?: T) =\> T | undefined | Parse JSON values from environment variables |
parseArray | Function | (value: string | undefined, delimiter?: string) =\> string[] | Parse array values from comma-separated strings |
inspectEnvironmentVariables | Function | () =\> void | Development helper to check environment variable availability |
validateRequiredEnvironmentVariables | Function | (provider: AuthProvider) =\> string[] | Validate required environment variables for specific providers |
ConfigInspector | Class | ConfigInspector | |
inspectAuthConfig | Function | (config: ResolvedAuthConfig) =\> void | Development helper to inspect auth configuration |
getConfigSummary | Function | (config: ResolvedAuthConfig) =\> string | Get configuration summary for debugging |
validateConfigWithFeedback | Function | (config: ResolvedAuthConfig) =\> { isValid: boolean; issues: string[]; suggestions: string[]; } | Validate configuration and provide detailed feedback |
ConfigInspectionResult | Interface | ConfigInspectionResult | |
createAuthProvider | Function | (config: ResolvedAuthConfig) =\> Promise\<AuthProvider\> | Create auth provider based on resolved configuration |
createAuthProviderFromConfig | Function | (baseConfig: AuthConfig) =\> Promise\<AuthProvider\> | Create auth provider from base configuration (with environment resolution) |
switchProviderInDevelopment | Function | (provider: string) =\> void | Development helper to switch provider at runtime |
getAvailableProviders | Function | () =\> string[] | Get available providers |
validateProviderConfig | Function | (providerType: string, config: Record\<string, unknown\>) =\> boolean | Validate provider configuration |
AuthGuard | Variable | React.FC\<AuthGuardProps\> | |
LoadingState | Variable | React.FC\<LoadingStateProps\> | |
PermissionGate | Variable | React.FC\<PermissionGateProps\> | |
AuthPrompt | Variable | React.FC\<AuthPromptProps\> | |
ErrorBoundary | Class | ErrorBoundary | ErrorBoundary component with modern error handling |
withAuthGuard | Variable | \<P extends object\>(Component: React.ComponentType\<P\>, config: AuthGuardProps["config"]) =\> React.ForwardRefExoticComp... | |
RequireAuth | Variable | React.FC\<{ children: React.ReactNode; redirectTo?: string; fallback?: React.ReactNode; }\> | |
RequirePermissions | Variable | React.FC\<{ children: React.ReactNode; permissions: string[]; mode?: "any" | "all" | "exact"; redirectTo?: string; }\> | |
RequireRoles | Variable | React.FC\<{ children: React.ReactNode; roles: string[]; mode?: "any" | "all" | "exact"; redirectTo?: string; }\> | |
PublicRoute | Variable | React.FC\<{ children: React.ReactNode; }\> | |
useAuthGuard | Variable | (config: AuthGuardConfig) =\> UseAuthGuardReturn | |
useSimpleAuthGuard | Variable | (requiresAuth?: boolean) =\> UseAuthGuardReturn | |
usePermissionGuard | Variable | (permissions: string[], mode?: "any" | "all" | "exact") =\> UseAuthGuardReturn | |
useRoleGuard | Variable | (roles: string[], mode?: "any" | "all" | "exact") =\> UseAuthGuardReturn | |
useRouteProtection | Variable | (routes?: RouteProtectionConfig[]) =\> UseRouteProtectionReturn | |
useCurrentRouteProtection | Variable | (config: Omit\<RouteProtectionConfig, "path"\>, getCurrentPath?: () =\> string) =\> { routeConfig: RouteProtectionConfig ... | |
useAuthRedirect | Variable | (config?: RedirectConfig) =\> UseAuthRedirectReturn | |
useAutoAuthRedirect | Variable | (config?: RedirectConfig & { redirectWhenUnauthenticated?: boolean; redirectWhenAuthenticated?: boolean; skipInitialR... | |
withRouteProtection | Variable | \<P extends object\>(Component: React.ComponentType\<P\>, config: Omit\<RouteProtectionConfig, "path"\>) =\> React.ForwardRe... | |
ProtectedRoute | Variable | React.FC\<{ children: React.ReactNode; config: Omit\<RouteProtectionConfig, "path"\>; fallback?: React.ReactNode; }\> | |
RouteProtectionProvider | Variable | React.FC\<{ children: React.ReactNode; defaultRoutes?: RouteProtectionConfig[]; }\> | |
AuthRedirect | Variable | React.FC\<{ config: RedirectConfig; when: "authenticated" | "unauthenticated" | "always"; children?: React.ReactNode; }\> | |
detectRouter | Variable | () =\> Promise\<RouterPlugin\> | |
createNavigator | Variable | () =\> Promise\<AuthNavigator\> | |
getAvailableRouters | Variable | () =\> RouterPlugin[] | |
registerRouterPlugin | Variable | (plugin: RouterPlugin) =\> void | |
getRouterByName | Variable | (name: string) =\> RouterPlugin | undefined | |
getDefaultNavigator | Variable | () =\> Promise\<AuthNavigator\> | |
navigateTo | Variable | (to: string, options?: NavigationOptions) =\> Promise\<void\> | |
buildRoute | Variable | (path: string, params?: Record\<string, any\>) =\> Promise\<string\> | |
getCurrentRoute | Variable | () =\> Promise\<string\> | |
decodeToken | Function | (token: string) =\> TokenPayload | null | Decode JWT token payload (without verification) |
| Warning: This does not verify the token signature | |||
isTokenExpired | Function | (token: string) =\> boolean | Check if token is expired |
getTimeUntilExpiry | Function | (token: string) =\> number | Get time until token expires (in milliseconds) |
needsRefresh | Function | (token: string, thresholdMs?: number) =\> boolean | Check if token needs refresh (within threshold) |
getUserIdFromToken | Function | (token: string) =\> string | null | Extract user ID from token |
getUserRoleFromToken | Function | (token: string) =\> string | null | Extract user role from token |
getPermissionsFromToken | Function | (token: string) =\> string[] | Extract permissions from token |
isValidTokenFormat | Function | (token: string) =\> boolean | Validate token format (basic check) |
createMockToken | Function | (payload: Partial\<TokenPayload\>) =\> string | Create a mock token for testing |
cleanToken | Function | (token: string) =\> string | Clean token (remove Bearer prefix if present) |
addBearerPrefix | Function | (token: string) =\> string | Add Bearer prefix to token |
createStorageAdapter | Function | (type: StorageType) =\> StorageAdapter | Create storage adapter based on type |
SecureStorage | Class | SecureStorage | Secure storage for sensitive auth data |
validateRedirectUrl | Function | (url: string, options?: UrlValidationOptions) =\> boolean | Validates a redirect URL to prevent open redirect attacks |
buildSafeRedirectUrl | Function | (baseUrl: string, redirectUrl?: string, options?: UrlValidationOptions) =\> string | Builds a safe redirect URL with validation |
extractSafeRedirectUrl | Function | (searchParams: URLSearchParams | string, paramName?: string, options?: UrlValidationOptions) =\> string | null | Extracts and validates a redirect URL from query parameters |
UrlValidationOptions | Interface | UrlValidationOptions | URL validation utility to prevent open redirect vulnerabilities |
| Provides secure validation of redirect URLs | |||
useSimpleLoading | Function | (loading: boolean, options?: SimpleLoadingOptions) =\> boolean | Simple hook for delayed loading states |
| Shows loading after a delay to prevent flickering | |||
SimpleLoadingOptions | Interface | SimpleLoadingOptions | |
ClerkAuthProvider | Class | ClerkAuthProvider | |
ClerkBridgeProvider | Function | ({ children, provider, }: ClerkBridgeProviderProps) =\> import("@types/react/jsx-runtime").JSX.Element | React component that bridges Clerk hooks with the auth provider |
| This component gracefully handles when ClerkProvider context is not yet available | |||
useClerkAuthProvider | Function | (config: ClerkProviderConfig) =\> ClerkAuthProvider | Hook to create and manage a Clerk auth provider instance |
BetterAuthProvider | Class | BetterAuthProvider | |
createBrowserAuthClient | Function | (baseURL?: string) =\> BetterAuthClientInstance | |
BetterAuthConfig | Interface | BetterAuthConfig | Better Auth Specific Types |
| Type definitions for Better Auth configuration and data structures | |||
BetterAuthUser | Interface | BetterAuthUser | |
BetterAuthSession | Interface | BetterAuthSession | |
UnifiedSettingsAuthAdapter | Class | UnifiedSettingsAuthAdapter | Adapter that implements SettingsAuthProvider using a AuthProvider |
| This bridges the unified auth system with the existing UI package settings auth interface | |||
createSettingsAuthAdapter | Function | (authProvider: AuthProvider) =\> UnifiedSettingsAuthAdapter | Factory function to create a UnifiedSettingsAuthAdapter |
isSettingsAuthProvider | Function | (obj: unknown) =\> obj is SettingsAuthProvider | Type guard to check if an object implements SettingsAuthProvider |
SSOCallback | 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. |
| 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 |
| 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):
componentOverrideprop — deepMerged on top of context value- Context value from AuthLocalizationProvider — deepMerged on top of defaults
- 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:
- Strip
basePathfrom the current pathname. - Normalise the remaining segment (leading slash, trailing slash, query).
- 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[]; } | |