Auth
2 endpoints
GET
/api/auth/mfa/recoverauth requiredCheck for a pending recovery reset
Whether a recovery code was spent but its reset (authenticator removal and sign-out everywhere) has not finished. When true, POST without a code to finish it.
Responses
200Reset state
| Field | Type | Required | Description |
|---|---|---|---|
| resetPending | boolean | required |
401Unauthorized
500Internal server error
POST
/api/auth/mfa/recoverauth requiredSign in with a recovery code
Spends one recovery code in place of the authenticator step. Removes every authenticator the user had, signs them out everywhere; the user signs in again and sets up a new authenticator. Five code attempts per 15 minutes, then 429.
Request Bodyrequired
| Field | Type | Required | Description |
|---|---|---|---|
| code | string | optional |
Responses
200Recovered; go to `redirect`
| Field | Type | Required | Description |
|---|---|---|---|
| redirect | string | required |
400Invalid body, missing code with no reset pending, or wrong code (MFA_RECOVERY_CODE_INVALID)
401Unauthorized
429Too many recovery code attempts (RATE_LIMITED)
500Internal server error
503Code accepted but the authenticator could not be removed yet; retry (MFA_RECOVERY_FAILED)