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
totpfor an authenticator code,recovery_codefor a recovery code.- one of
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
enabledbooleanrequiredrecoveryCodesRemainingintegerrequired- at least 0
requiredByOrganizationIdslist of stringrequired- each item: not empty
sessionVerifiedbooleanrequired
Other fields are allowed.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 409 | Conflict |
|
| 429 | Too Many Requests |
|
| 500 | Internal Server Error |
|
| 503 | Service Unavailable |
|