graphql-authentication icon indicating copy to clipboard operation
graphql-authentication copied to clipboard

2FA - Add a separate mutation for disabling 2FA

Open Stalex89 opened this issue 2 years ago • 1 comments

Hi @jamesedmonston,

Thank you very much for making 2FA possible with the plugin.

Is it possible to add an extra mutation to disable 2FA for user? something like this:

mutation disableTwoFactor {
  disableTwoFactor(
    email: "[email protected]"
    password: "testing123"
    code: "123456"
  ) {
    twoFactorEnabled
  }
}

// returns
{
  "data": {
    "twoFactorEnabled": false
  }
}

Thank you in advance!

Stalex89 avatar Sep 13 '23 13:09 Stalex89

@Stalex89 Looks like I forgot to document the disable mutation... https://github.com/jamesedmonston/graphql-authentication/blob/develop/src/services/TwoFactorService.php#L201-L239

jamesedmonston avatar Dec 04 '23 09:12 jamesedmonston

@Stalex89 I've documented this here: https://graphql-authentication.jamesedmonston.co.uk/usage/two-factor-authentication#disable-two-factor

jamesedmonston avatar Aug 26 '24 15:08 jamesedmonston