Tearleads

POST/auth/two-factor/disable

Turn off two-factor authentication

Operation auth.twoFactor.disable

Description

Turns off two-factor authentication after checking an authenticator or recovery code. It deletes the secret, the recovery codes, and every remembered device, and revokes every session of the identity, the calling one included; each renews by signing in again. Organizations that require two-factor authentication of this member refuse the renewed sessions.

Authentication

Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.

Request body

application/jsonTwoFactorConfirmationRequest

Proves the second factor again before turning it off or replacing the recovery codes.

2 fields
  • codestringrequired
    • 1 to 32 characters

    An authenticator code or an unused recovery code.

  • methodstringrequired
    • one of totp, recovery_code

    totp for an authenticator code, recovery_code for a recovery code.

Other fields are allowed.

Responses

200 OK

application/jsonTwoFactorStatusResponse

The signed-in identity's two-factor state and the calling session's standing.

4 fields
  • enabledbooleanrequired
  • recoveryCodesRemainingintegerrequired
    • at least 0
  • requiredByOrganizationIdslist of stringrequired
    • each item: not empty
  • sessionVerifiedbooleanrequired

Other fields are allowed.

Other responses

StatusMeaningBody
400Bad Request

application/jsonTwoFactorErrorResponse

401Unauthorized

application/jsonSessionFailureResponse

409Conflict

application/jsonTwoFactorErrorResponse

429Too Many Requests

application/jsonTwoFactorErrorResponse

500Internal Server Error

application/jsonErrorResponse

503Service Unavailable

application/jsonErrorResponse