Skip to main content

Recover From TOTP

POST 

/api/auth/2fa/totp/recover

Recover the user if they lost access to their 2FA device using a recovery code. Each code is only valid once.

You can learn more about recovery for TOTP here.

Requirements

  • The user can authenticate using password.
  • The user enabled TOTP as 2FA method.

Optional session data:

  • The session object can be included in the request body.
  • Inside the session object, you can provide the following optional fields:
    • browser: The name of the browser used (e.g., "Chrome", "Firefox").
    • os: The operating system of the device (e.g., "Windows", "macOS", "Android").

Tokens

Request

Responses

Recovery successful. If header authentication is enabled, the response will contain all tokens.