"user has already enabled MFA" error when user hasn't enabled MFA

Hi, I followed the NodeJS example code but whenever I try to get a private key I get the same error:

WalletLoginError: Custom. User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa

I got this same error even when I used a brand new Google account, which I was 100% sure I had never used before with web3auth, let alone enabled MFA with. It seems like this error message is likely used erroneously for some other error that is taking place, but I am unsure of what that might be.

My organization is on the basic plan, so I am wondering if that’s it-- do we need to upgrade to Growth before we can use custom verifiers on testnet?

  • SDK Version: 1.1.0
  • Verifier Details:
    • Verifier Name: valora-google-verifier
    • JWKS Endpoint: not sure where to find this for a google verifier
    • Sample idToken(JWT): eyJhbGciOiJSUzI1NiIsImtpZCI6IjYwODNkZDU5ODE2NzNmNjYxZmRlOWRhZTY0NmI2ZjAzODBhMDE0NWMiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIxMDY3NzI0NTc2OTEwLTdrNHU5ODF2M2pwbGY1dTk3MGpkbnQ0bXBtOHE5MWU3LmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiMTA2NzcyNDU3NjkxMC1qN2FxcTg5Z2ZlNWMzMGxuZDl1OGprdDc4Mzdmc3BybS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjEwNzE1MDU3Nzc5MjM5MTcwNTQ2MSIsImVtYWlsIjoiY2hhcmxpZS52YWxvcmEyQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiQ2hhcmxpZSIsInBpY3R1cmUiOiJodHRwczovL2xoMy5nb29nbGV1c2VyY29udGVudC5jb20vYS9BQWNIVHRjV192Sks2bEpQLTFGenRxbjRLZ2tCTHZmbU5HVWNYMXdSZVNmVT1zOTYtYyIsImdpdmVuX25hbWUiOiJDaGFybGllIiwibG9jYWxlIjoiZW4iLCJpYXQiOjE2ODU1NTIzMDUsImV4cCI6MTY4NTU1NTkwNX0

Here is a jest test I used to repro the error:

import Web3Auth from '@web3auth/node-sdk'
import jwtDecode from 'jwt-decode'

describe('web3auth', () => {
  it('able to get torus private key from nodejs sdk', async () => {
    const testnetClientId =
      'BDmvH-WIJ0vFMRhJD9OnjAxQAb5Kq05h_oEO3EbWebzEUYxEegc4qC6SnBNmm3EGeIUrHyr1KHf621_0HSITWsU'
    const web3Auth = new Web3Auth({
      web3AuthNetwork: 'testnet',
      clientId: testnetClientId,
      chainConfig: {
        chainNamespace: 'eip155',
        chainId: '44787',
        rpcTarget: 'https://alfajores-forno.celo-testnet.org/',
      },
      enableLogging: true,
    })
    web3Auth.init()
    const jwt =
      'eyJhbGciOiJSUzI1NiIsImtpZCI6IjYwODNkZDU5ODE2NzNmNjYxZmRlOWRhZTY0NmI2ZjAzODBhMDE0NWMiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIxMDY3NzI0NTc2OTEwLTdrNHU5ODF2M2pwbGY1dTk3MGpkbnQ0bXBtOHE5MWU3LmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiMTA2NzcyNDU3NjkxMC1qN2FxcTg5Z2ZlNWMzMGxuZDl1OGprdDc4Mzdmc3BybS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjEwNzE1MDU3Nzc5MjM5MTcwNTQ2MSIsImVtYWlsIjoiY2hhcmxpZS52YWxvcmEyQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiQ2hhcmxpZSIsInBpY3R1cmUiOiJodHRwczovL2xoMy5nb29nbGV1c2VyY29udGVudC5jb20vYS9BQWNIVHRjV192Sks2bEpQLTFGenRxbjRLZ2tCTHZmbU5HVWNYMXdSZVNmVT1zOTYtYyIsImdpdmVuX25hbWUiOiJDaGFybGllIiwibG9jYWxlIjoiZW4iLCJpYXQiOjE2ODU1NTIzMDUsImV4cCI6MTY4NTU1NTkwNX0.ff2bbaDQiDxcSUG8XKBaxz22zPjk5MeXlQwy1MqCHZgD6kcnbOzF5OIQYdRw8-Ue2ANAyLyloEYUxgk6jIMGuVUqImfi0gxiAVqwyS-W_FGNbsRt9R_b3qpQf54FkHukAAu84CjZtxIb0XkrXKboQH7uKFG94q7_JsOjwbVIGWcAhHgt6mHu-W9xg6zPVw-J71tnUwEpaCvxVLxto6nBN9p7D9T6Nt-_zDe5mSUKUURLGfrk2giCxA89WNUUMsO-sAi6Sz4UOxRAmcq3ksO_pITCrd5AEozkqqyDXqi9WCmS079RSwzfoNE6sjPx3H6bx1hYxIs1QiF9st0UFYKpAg'
    const { email: verifierId } = jwtDecode<{ email: string }>(jwt)
    const provider = await web3Auth.connect({
      verifier: 'valora-google-verifier',
      verifierId,
      idToken: jwt,
    })
    if (!provider) {
      throw new Error('provider is undefined')
    }
    const privateKey = await provider.request({ method: 'eth_private_key' })
    expect(privateKey).toBeTruthy()
  })
})

Hello @charlie.andrews,

It appears that there may be an issue with your verifier valora-google-verifier. Would you be able to provide me with the validation fields that you used when initially setting up the verifier? This information will be helpful in resolving the issue.

Also, the verifierId here will be the sub value, not the email.

Thank you.

We have not received any response. Do reply, if you need help.

You may join our upcoming community call - Web3Auth Community Call #4 · Zoom · Luma