ChangePasswordForm
Change-password form for the currently-signed-in user. Authenticated flow; the server requires the current password as a re-auth defense.
After success, the caller’s existing tokens remain valid (the
server doesn’t bump the token-version on a password change unless
the caller follows up with logoutAll()). Render a
<LogoutAllButton> near this form so users can opt to terminate
other devices after the rotation.
Usage
import { ChangePasswordForm } from '@rw3iss/auth-client/preact/forms';
<ChangePasswordForm onSuccess={(resp) => navigate("/")} onError={(err) => console.error(err)}/>Props
| Name | Type | Description |
|---|---|---|
client | AuthClient | |
onSuccess | () => void | |
onError | (err: Error) => void | |
className | string |