Skip to content
LogoLogo

Complete a sign-in with a second factor

Complete a sign-in with a second factor

POST/api/v1/auth/mfa/verify

Exchanges the challenge from login and a code for a browser session. This is the only place a challenge becomes a session; a challenge on its own reads nothing.

The code may be a TOTP code or one of the account's recovery codes. Recovery codes are matched ignoring spacing and case, and each is accepted exactly once.

A code is refused identically whether it was a wrong TOTP value, an unrecognized recovery code, or one already spent — telling them apart would report which factors the account actually has. A TOTP code is also refused on its second use, so a code observed in transit is not replayable for the rest of its window.

The challenge counts its own attempts and gives up after five, because a six-digit code is reachable by brute force within the challenge lifetime if it never does. An exhausted or expired challenge returns 401 invalid_challenge, and the caller must sign in again.

Request Body

application/json
mfa_tokenRequired
string·min 1·max 128
codeRequired
string <password>·min 1·max 64

Either a six-digit TOTP code or one of the account's recovery codes. Recovery codes are matched after stripping spaces and hyphens and upper-casing, so a code read off paper matches however it was grouped.

remember_me
boolean

Whether to remember this device; use the value chosen at the first sign-in step. true (the default when omitted, which preserves earlier client behavior) issues a persistent session cookie with the 7-day idle and 30-day absolute lifetimes. false issues a browser-session cookie that the browser discards when it closes, and the server bounds the session to 48 hours, idle and absolute.

Responses