palbaseDocs

Palbase Auth API · API

POST/auth/mfa/recovery

Use recovery code to bypass MFA

Use a recovery code to bypass MFA during login. The mfa_token and the recovery code are both consumed. Issues a session at AAL1 (single-factor bypass).

Not when the risk engine asked the sign-in for a strong factor (risk_strict_step_up): a recovery code does not stand in for an authenticator app or a passkey, and is answered 400 factor_not_allowed with nothing spent. A sign-in for an OAuth authorization request whose sensitive scope or acr_values needs aal2 is answered 400 auth_request_invalid, also with nothing spent.

Called by your app, with the publishable key.

Request body

codestring · requiredOne-time recovery code (issued at first MFA enrollment / regeneration).
mfa_tokenstring · required
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/mfa/recovery" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "content-type: application/json" \
  -d '{"code":"string","mfa_token":"string"}'

Responses

200Recovery accepted, session issued

400Validation failed or required field missing

401Missing, invalid, or expired credentials

429Rate limit exceeded

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation MfaRecovery of auth's contract.