Forgot Password Form
BlockBasic Usage
Loading...
Installation
pnpm add @corew500/uiUsage
import { ForgotPasswordForm } from "@corew500/ui/blocks/forgot-password-form"
<ForgotPasswordForm>Content</ForgotPasswordForm>API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | RequestPasswordResetAction | — | Server action for requesting password reset. Import from '@corew500/feature-auth/server' and pass as prop. @example ```tsx import { ForgotPasswordForm } from '@corew500/feature-auth' import { requestPasswordReset } from '@corew500/feature-auth/server' export default function Page() { return <ForgotPasswordForm action={requestPasswordReset} loginHref="/login" /> } ``` |
| validation | AuthValidationOptions | — | Validation configuration |
| locale | string | — | Locale for i18n-aware redirects |
| redirectTo | string | — | Custom email redirect URL for password reset |
| onSuccess | (data: ForgotPasswordSuccessData) => void | Promise<void> | — | Called after password reset email is sent successfully. Can be async - the form will await completion. |
| onAuthError | (error: AuthFormError) => void | — | Called when the request fails. Receives the error code (if available) and message. |
| onSubmitStart | () => void | — | Called immediately before the form submits. Useful for analytics, global loading states, or last-minute checks. |