Auth

2 endpoints

GET/api/auth/mfa/recoverauth required

Check 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
FieldTypeRequiredDescription
resetPendingbooleanrequired
401Unauthorized
500Internal server error
POST/api/auth/mfa/recoverauth required

Sign 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
FieldTypeRequiredDescription
codestringoptional
Responses
200Recovered; go to `redirect`
FieldTypeRequiredDescription
redirectstringrequired
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)