Skip to content
rw3iss Auth

ChangePasswordForm

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

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

NameTypeDescription
clientAuthClient
onSuccess() => void
onError(err: Error) => void
classNamestring