DeleteAccountForm
Self-service account-deletion form. The dangerous-zone twin of
- Current password (re-auth defense).
- Type “DELETE” exactly to confirm — defends against an attacker firing the endpoint via stolen credentials without the user noticing.
On success: caller is logged out cross-replica (token-version bumped
on the server side) and the snapshot flips to anonymous. Wire
onDeleted to navigate to a “we’re sorry to see you go” page or
back to the marketing site.
Usage
import { DeleteAccountForm } from '@rw3iss/auth-client/preact/forms';
<DeleteAccountForm onError={(err) => console.error(err)}/>Props
| Name | Type | Description |
|---|---|---|
client | AuthClient | |
onDeleted | () => void | |
onError | (err: Error) => void | |
className | string |