Regenerate TOTP secret and backup codes
Generates a new TOTP secret and backup codes, staged for swap: the old secret and backup codes remain valid until the user verifies a code from the new secret; abandoning the flow (or a failed verification) leaves them intact, so 2FA is never silently disabled. Requires a single-use reauth ticket obtained by verifying any one of the user's factors (password, TOTP, or Passkey) via `POST /api/user/reauth/verify` (see `consume_reauth`).
Generates a new TOTP secret and backup codes, staged for swap: the old
secret and backup codes remain valid until the user verifies a code from
the new secret; abandoning the flow (or a failed verification) leaves them
intact, so 2FA is never silently disabled. Requires
a single-use reauth ticket obtained by verifying any one of the user's factors
(password, TOTP, or Passkey) via POST /api/user/reauth/verify (see consume_reauth).
bearer_authAuthorizationBearer <token>application/json- body
reauth_token*stringTOTP secret regenerated
application/json- response
backupCodes*array<string>qrCodeUrl*stringsecret*stringtempToken*stringcurl -X POST 'https://example.com/api/user/totp/regenerate' \
-H 'Content-Type: application/json' \
-d '{
"reauth_token": "string"
}'{
"backupCodes": [
"string"
],
"qrCodeUrl": "string",
"secret": "string",
"tempToken": "string"
}