Skip to main content

Disable 2FA

The disable2FA mutation is used to disable a specified two-factor authentication (2FA) method for the user. This allows users to manage their 2FA settings by removing methods they no longer wish to use.

Mutation: disable2FA

Schema:

disable2FA(
method: String!
): String!

Parameters

  • method (String): The 2FA method to be disabled. This field is mandatory and can have the following values:
    • "app": Disable Google Authentication.
    • "phone": Disable SMS code.
    • "email": Disable email code.

Return

The mutation returns a string indicating the result of the disable 2FA request.

  • "Success": Indicates that the specified 2FA method has been successfully disabled.
  • "Failed": Indicates that there was an error in processing the request, such as the method not being set up or an internal error.

Example Mutation

The following is an example of how to use the disable2FA mutation to disable a 2FA method:

mutation {
disable2FA(
method: "email"
)
}

In this example, the mutation attempts to disable the email 2FA method for the user. The return value will indicate whether the 2FA method was successfully disabled or if there was an error.