security

Manage multi-factor authentication

Changed on

Activate or deactivate multi-factor authentication for the authenticated user

post/user/mfa

Request

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

Request body

codestring required

Verification code from the authenticator app when activating MFA

activeMfaType'totp' | ''

Type of MFA to activate. Use empty string to disable MFA.

Example request

{
  "code": "123456",
  "activeMfaType": "totp"
}

Response

MFA status successfully updated

'OK' required

Changes

    • warning

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

    • warning

      added the new user-already-exists enum value to the response property for the response status

    • info

      removed the email-already-in-use enum value from the response property for the response status