Skip to main content

verifyTwoFactor

Public: no authentication required.

Finishes a sign-in that needs a second factor, using the temporary token from the sign-in and a verification code. Returns tokens and a session token.

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 VerifyTwoFactor($input: VerifyTwoFactorInput!) {
verifyTwoFactor(input: $input) {
accessToken
expiresIn
mustChangePassword
organizationId
partnerId
refreshToken
organization {
id
code
postalCode
registrationNumber
name
status
}
}
}

Variables:

{
"input": {
"tempToken": "string",
"token": "string",
"userId": "string"
}
}

Response:

{
"data": {
"verifyTwoFactor": {
"accessToken": "string",
"expiresIn": 0,
"mustChangePassword": true,
"organizationId": "string",
"partnerId": "string",
"refreshToken": "string",
"organization": {
"id": "string",
"code": "string",
"postalCode": "string",
"registrationNumber": "string",
"name": "string",
"status": "string"
}
}
}
}
verifyTwoFactor(
input: VerifyTwoFactorInput!
): AuthResponse!

Arguments​

verifyTwoFactor.input ● VerifyTwoFactorInput! non-null input​

The user ID, the verification code and the temporary token from the sign-in.

Type​

AuthResponse object​

The result of a sign in.