TwoFactorDisableForm
Disable 2FA. Server requires BOTH the current password and a fresh TOTP code as defense against accidental / hijack-driven disable. On success, the user’s token-version is bumped so every existing session learns 2FA is off (otherwise users could see stale UI).
Usage
import { TwoFactorDisableForm } from '@rw3iss/auth-client/preact/forms';
<TwoFactorDisableForm onSuccess={(resp) => navigate("/")} onError={(err) => console.error(err)}/>Props
| Name | Type | Description |
|---|---|---|
client | AuthClient | |
onSuccess | () => void | |
onError | (err: Error) => void | |
className | string |