GitHub

Reset Password Form

Block
Form for resetting password with token

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { ResetPasswordForm } from "@corew500/ui/blocks/reset-password-form"

<ResetPasswordForm>Content</ResetPasswordForm>

API Reference

Props

PropTypeDefaultDescription
action*UpdatePasswordAction—Server action for updating password. Import from '@corew500/feature-auth/server' and pass as prop. @example ```tsx import { ResetPasswordForm } from '@corew500/feature-auth' import { updatePassword } from '@corew500/feature-auth/server' export default function Page() { return <ResetPasswordForm action={updatePassword} loginHref="/login" /> } ```
validationAuthValidationOptions—Validation configuration
localestring—Locale for i18n-aware redirects
redirectTostring—Custom redirect path after success
onSuccess() => void | Promise<void>—Called after password is successfully reset. Can be async - the form will await completion.
onAuthError(error: AuthFormError) => void—Called when password reset 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.