Skip to content
rw3iss Auth

PasswordResetForm

form @rw3iss/auth-client/preact/forms/PasswordResetForm framework-adapters/preact/components/forms/PasswordResetForm.tsx ↗

Reset-password form, completing the flow started by the “forgot password” email. Mount this on the route the reset email links to (e.g. /auth/reset?token=…) and pass token from the URL.

On success, the new password is set server-side; this form does NOT automatically log the user in — they get a “now sign in” affordance. Wire onSuccess to redirect to /login.

Usage

import { PasswordResetForm } from '@rw3iss/auth-client/preact/forms';
<PasswordResetForm
token={"token"}
onSuccess={(resp) => navigate("/")}
onError={(err) => console.error(err)}
/>

Props

NameTypeDescription
tokenstringThe single-use token from the reset email link. (required)
clientAuthClient
onSuccess() => void
onError(err: Error) => void
loginHrefstringRoute the “Sign in” affordance points to on success.
classNamestring