twofactor#
disable2fa#
Disable 2FA — requires the account password plus a TOTP or recovery code.
Parameters#
| Parameter | Type |
|---|---|
password |
string |
code |
string |
Returns#
Promise<void>
regenerateRecoveryCodes#
Replace recovery codes (invalidates the old set). Requires a valid TOTP code.
Parameters#
| Parameter | Type |
|---|---|
code |
string |
Returns#
Promise<string[]>
setup2fa#
Begin enrollment — returns the secret + otpauth URI (not yet enabled).
Returns#
Promise<TwoFactorSetup>
verify2faSetup#
Confirm enrollment with a code from the authenticator. Returns one-time recovery codes.
Parameters#
| Parameter | Type |
|---|---|
code |
string |
Returns#
Promise<string[]>
TwoFactorSetup#
Two-factor auth (TOTP) account-management API. All endpoints require an authenticated session (the axios interceptor attaches the access token) and operate only on the current user. UI lives per-consumer; logic lives here.