Wrapper components combine presentational components and hooks with context integration, navigation handling, and sensible defaults. They simplify common authentication and user flows.
Wraps BackupCodeLoginForm with Auth context.
Props:
onSuccess?: () => void— Callback after successful login.componentProps?: Partial<React.ComponentProps<typeof BackupCodeLoginForm>>— Pass-through props to the form component.
Usage:
<BackupCodeLoginWrapper onSuccess={() => alert('Logged in!')} />Wraps BackupCodesForm and useBackupCodes.
Props:
componentProps?: Partial<React.ComponentProps<typeof BackupCodesForm>>— Pass-through props.
Usage:
<BackupCodesWrapper />Wraps ChangePasswordForm with useAuth.changePassword.
Props:
onSuccess?: () => void— Callback after successful password change.componentProps?: Partial<React.ComponentProps<typeof ChangePasswordForm>>— Pass-through props.
Usage:
<ChangePasswordFormWrapper onSuccess={() => console.log('Password changed')} />Wraps LoginForm with useAuth and navigation.
Props:
onSuccess?: () => void— Callback after successful login.redirectTo?: string— Override default post-login route.componentProps?: Partial<Omit<LoginFormProps, 'onSubmit'>>— Pass-through props withoutonSubmit.
Usage:
<LoginFormWrapper redirectTo="/dashboard" />Wraps RegisterForm with useAuth.register and navigation.
Props:
onSuccess?: () => void— Callback after successful registration.redirectTo?: string— Override default post-registration route.componentProps?: Partial<Omit<RegisterFormProps, 'onSubmit' | 'timezones' | 'getInitialTimezone'>>— Pass-through props.
Usage:
<RegisterFormWrapper onSuccess={() => navigate('/welcome')} />Wraps LogoutPage with useAuth.logout and navigation.
Props:
onSuccess?: () => void— Callback after logout.redirectTo?: string— Override post-logout route.componentProps?: Partial<React.ComponentProps<typeof LogoutPage>>— Pass-through props.
Usage:
<LogoutPageWrapper redirectTo="/login" />Wraps VerifyEmailPage with useEmailVerification.
Props:
onSuccess?: () => void— Callback after successful verification.componentProps?: Partial<React.ComponentProps<typeof VerifyEmailPage>>— Pass-through props.
Usage:
<VerifyEmailPageWrapper onSuccess={() => alert('Email verified')} />Wraps UserSettingsForm with useUserSettings.
Props:
onSuccess?: () => void— Callback after successful update.componentProps?: Partial<Omit<UserSettingsFormProps, 'initialValues' | 'onSubmit' | 'languages'>>— Pass-through props.
Usage:
<UserSettingsFormWrapper onSuccess={() => showToast('Settings saved')} />