Skip to main content

enableTwoFactor

Requires an authenticated session.

Turns on two-factor sign-in by checking a code from the authenticator app against the setup started by setupTwoFactor. Fails if the setup has expired or the code is wrong.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation EnableTwoFactor($input: EnableTwoFactorInput!) {
enableTwoFactor(input: $input)
}

Variables:

{
"input": {
"token": "string"
}
}

Response:

{
"data": {
"enableTwoFactor": true
}
}
enableTwoFactor(
input: EnableTwoFactorInput!
): Boolean!

Arguments​

enableTwoFactor.input ● EnableTwoFactorInput! non-null input​

The code from the authenticator app and an optional device name.

Type​

Boolean scalar​

The Boolean scalar type represents true or false.