Skip to content
rw3iss Auth

DeleteAccountForm

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

Self-service account-deletion form. The dangerous-zone twin of . Requires:

  1. Current password (re-auth defense).
  2. 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

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