user

Generate TOTP secret

Changed on

Generate a Time-based One-Time Password (TOTP) secret for setting up multi-factor authentication

get/mfa/totp/generate

Request

  • Base URL
    https://{subdomain}.auth.{region}.nhost.run/v1
  • URL
    https://{subdomain}.auth.{region}.nhost.run/v1/mfa/totp/generate
  • Auth
    HTTP bearer

Response

TOTP secret successfully generated

imageUrlstring required

URL to QR code image for scanning with an authenticator app

totpSecretstring required

TOTP secret key for manual setup with an authenticator app

Example response

{
  "imageUrl": "data:image/png;base64,iVBORw0KGg...",
  "totpSecret": "ABCDEFGHIJK23456"
}

Changes

    • info

      the endpoint scheme security BearerAuthElevated was added to the API

    • info

      the endpoint scheme security BearerAuth was removed from the API

    • warning

      added the new otp-too-many-attempts enum value to the response property for the response status