PasswordResetForm
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
| Name | Type | Description |
|---|---|---|
token | string | The single-use token from the reset email link. (required) |
client | AuthClient | |
onSuccess | () => void | |
onError | (err: Error) => void | |
loginHref | string | Route the “Sign in” affordance points to on success. |
className | string |