Confirm and enable TOTP two-factor authentication
POST/api/v1/auth/2fa/confirm
Checks a code from the authenticator against the pending secret and enables two-factor authentication. Returns the recovery codes, once. setupToken must be the one /api/v1/auth/2fa/setup returned with that secret (it expires after 10 minutes). A notice email is sent to the account's address.
Request
Responses
- 200
- 400
- 401
- 409
Two-factor authentication enabled
Missing code, no pending setup, or a missing, expired or mismatched setupToken (error code INVALID_SETUP_TOKEN).
Not authenticated, or the code is wrong (error code INVALID_2FA_CODE).
Resource conflict