Stuck on "new device detected" when logging in with `@web3auth/no-modal`, unable to skip

I’m trying to login on our app with twitter using our app and I end up stuck on a “New device detected” screen that is forcing me to verify with a second factor without an option to skip it. However, on https://app.tor.us I have the option “Skip for now”. In my app, I have mfaLevel set to “none”. Can you explain how the “skip for now” option could be enabled in my app login flow?

Screenshots showing the lack of “skip for now” option in my app vs its presence for app.tor.us - I’m using the same verifier and twitter account for login on both.

app.tor.us :

our app:

Snippet of relevant code:

const chainConfig = {
      chainNamespace: CHAIN_NAMESPACES.OTHER,
      // these are just dummy values, they are not used,
      // but without them Web3Auth throws an error
      chainId: '0x1',
      rpcTarget: 'https://dummy.target',
      displayName: '',
      blockExplorer: '',
      ticker: '',
      tickerName: '',
    }
    copyWeb3AuthSession(
      `${NATIVE_SESSION_KEY}_${sessionNamespace}`,
      NATIVE_SESSION_KEY,
    )
    const web3Auth = new Web3AuthNoModal({
      clientId: web3AuthClientId,
      web3AuthNetwork,
      chainConfig,
      sessionTime,
    })
    const privateKeyProvider = new CommonPrivateKeyProvider({
      config: {chainConfig},
    })

    const openloginAdapter = new OpenloginAdapter({
      privateKeyProvider,
      adapterSettings: {
        clientId: web3AuthClientId,
        network: web3AuthNetwork,
        uxMode: 'popup',
      },

    })
    web3Auth.configureAdapter(openloginAdapter)

    await web3Auth.init()

    const provider = await web3Auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
      mfaLevel: 'none', // Pass on the mfa level of your choice: default, optional, mandatory, none
      loginProvider,
    })

    assert(provider != null)

    const privateKey = Buffer.from(
      (await provider.request({
        method: 'private_key',
      })) as string,
      'hex',
    )
    const userInfo = await web3Auth.getUserInfo()

Details:

  • SDK Version(package.json):
    "@web3auth/base": "^8.7.0",
    "@web3auth/base-provider": "^8.7.0",
    "@web3auth/no-modal": "^8.7.0",
    "@web3auth/openlogin-adapter": "^8.7.0",
  • Platform: MacOS/Chrome

Hey @rafael.korbas, the first screenshot you shared, that shouldn’t happen. Skip for now, is not shown when MFA is enabled, and there are not enough shares for user to login in successfully. For instance, one share is stored on the device local storage. So, if you login with Google account, and if the device share is present, it’ll auto login. If you change the device, or device share is not present/ deleted, that means, you only have one share, and to reconstruct the private key you require at least two shares. Hence it shows you that screen to verify using recovery options. Once you have verified, it’ll have two shares again and it’ll be able to reconstruct the private key.

When you pass the none to the mfaLevel, it means users won’t be shown to setup the 2FA. Since, from your code it looks like you are using global verifier. So for instance, if I’m using dApp XYZ and have enabled the MFA on that dApp, it’ll ask me to verify myself on your dApp regardless of your mfaLevel you set.

I was logging in with twitter and I believe I never enabled MFA for that account at all. I’m also able to verify that in the management console for that account in https://cyan.openlogin.com .

Moreover, when I click “skip for now” when logging in thorugh app.tor.us, I’m able to log in successfully, so there doesn’t to be an inherent problem that should make logging in with twitter on my app impossible without verification.

In both cases (my app and app.tor.us) I’m trying to log in against the public verifier tkey-auth0-twitter and the verifier id is twitter|2837270297

I guess this issue may be related to my earlier question in this forum: Twitch and Twitter logins on shared verifier seem to be broken - #17 by rafael.korbas

could you please look into that?