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*UpdatePasswordActionServer 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" /> } ```
validationAuthValidationOptionsValidation configuration
localestringLocale for i18n-aware redirects
redirectTostringCustom 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) => voidCalled when password reset fails. Receives the error code (if available) and message.
onSubmitStart() => voidCalled immediately before the form submits. Useful for analytics, global loading states, or last-minute checks.