user

Verify a recovery code and upgrade the session to AAL2.

Changed on

Redeems one single-use recovery code from an AAL1 session. The submitted code is normalized before comparison: whitespace and - separators are removed and letters are lowercased, so K4M9-X7QP-2AB8-HT3Z and k4m9x7qp2ab8ht3z are equivalent. A matched code is consumed and cannot be used again.

post/factors/recovery-codes/verify

Request

  • Base URL
    https://abcdefghijklmnopqrst.supabase.co/auth/v1
  • URL
    https://abcdefghijklmnopqrst.supabase.co/auth/v1/factors/recovery-codes/verify
  • Auth
    API key in header apikey and HTTP bearer

Request body

codestring required

The recovery code to redeem. Separators, whitespace and letter case are ignored.

Example request

{
  "code": "K4M9-X7QP-2AB8-HT3Z"
}

Response

The recovery code was accepted and consumed. These new credentials have an increased Authenticator Assurance Level (AAL) and an amr claim that includes mfa/recovery_code.

access_tokenstring

A valid JWT that will expire in expires_in seconds.

refresh_tokenstring

An opaque string that can be used once to obtain a new access and refresh token.

token_typestring

What type of token this is. Only bearer returned, may change in the future.

expires_ininteger

Number of seconds after which the access_token should be renewed by using the refresh token with the refresh_token grant type.

expires_atinteger

UNIX timestamp after which the access_token should be renewed by using the refresh token with the refresh_token grant type.

Changes