Unable to onboard new users using google with aggregate verifier

We have been getting the same errors from users first signing in to our platform over the past few days (not from existing users though):

We use:

    "@web3auth/base": "^5.1.0",
    "@web3auth/metamask-adapter": "^5.1.0",
    "@web3auth/no-modal": "^5.1.0",
    "@web3auth/openlogin-adapter": "^5.1.1",

And instantiate it like so:

const web3AuthChainConfig: Record<
  'testnet' | 'cyan',
  Web3AuthNoModalOptions['chainConfig']
> = {
  testnet: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: '0x64',
    rpcTarget: process.env.NEXT_PUBLIC_WEB3_AUTH_RPC_TARGET,
    displayName: 'Gnosis Mainnet',
    blockExplorer: 'https://gnosisscan.io',
    ticker: 'xDai',
    tickerName: 'xDai',
  },
  cyan: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: '0x64',
    rpcTarget: process.env.NEXT_PUBLIC_WEB3_AUTH_RPC_TARGET,
    displayName: 'Gnosis Mainnet',
    blockExplorer: 'https://gnosisscan.io',
    ticker: 'xDai',
    tickerName: 'xDai',
  },
} as const;

const ONE_WEEK = 604800;

const loginParameters: Record<LoginProvider, LoginParameters> = {
  metamask: {},
  google: {
    loginProvider: 'google',
    sessionTime: ONE_WEEK,
    mfaLevel: 'none',
    extraLoginOptions: {
      verifierIdField: 'email',
    },
  },
  linkedin: {
    loginProvider: 'linkedin',
    sessionTime: ONE_WEEK,
    mfaLevel: 'none',
    extraLoginOptions: {
      verifierIdField: 'email',
    },
  },
  twitter: {
    loginProvider: 'twitter',
    sessionTime: ONE_WEEK,
    mfaLevel: 'none',
    extraLoginOptions: {
      verifierIdField: 'email',
    },
  },
} as const;

  const metamaskAdapter = new MetamaskAdapter({ sessionTime: ONE_WEEK });
  const openloginAdapter = new OpenloginAdapter({
    clientId: process.env.NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID,
    adapterSettings: {
      uxMode: 'redirect',
      loginConfig: {
        google: {
          name: 'google',
          typeOfLogin: 'jwt',
          verifier: 'grappa-social',
          verifierSubIdentifier: 'google',
          clientId: auth0ClientId,
          jwtParameters: {
            domain: auth0Domain,
            connection: 'google-oauth2',
            isVerifierIdCaseSensitive: false,
          },
        },

        twitter: {
          name: 'twitter',
          typeOfLogin: 'jwt',
          verifier: 'grappa-social',
          verifierSubIdentifier: 'twitter',
          clientId: auth0ClientId,
          jwtParameters: {
            domain: auth0Domain,
            isVerifierIdCaseSensitive: false,
          },
        },

        linkedin: {
          name: 'linkedin',
          typeOfLogin: 'jwt',
          verifier: 'grappa-social',
          verifierSubIdentifier: 'linkedin',
          clientId: auth0ClientId,
          jwtParameters: {
            domain: auth0Domain,
            isVerifierIdCaseSensitive: false,
          },
        },
      },
    },
  });
  const web3Auth = new Web3AuthNoModal({
    clientId: process.env.NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID,
    web3AuthNetwork: authNetwork,
    chainConfig: web3AuthChainConfig[authNetwork],
  });

  web3Auth.configureAdapter(metamaskAdapter);
  web3Auth.configureAdapter(openloginAdapter);

  return web3Auth;

And login using the sdk’s connectTo method.

Some additional information:

  1. Existing users are able to login
  2. Login using Linkedin works, the problem is reproducible when signing in from the first time using google only
  3. This isn’t always reproduce on mobile - meaning if the same user tries again on mobile, it might work.
  4. Environment variables are set correctly

This is very crucial for us as we are unable to onboard users successfully as the past few days

Hello @shayg,

Could you kindly provide the initialization and login code, as well as the aggregate verifier name, in this thread? Thank you.

Verifier name is in the provided snippet (grappa-social), the initialization code is provided as well, here’s the missing login code:

      const loginParams = loginParameters[loginProvider];
       const res = await web3Auth.connectTo(
         WALLET_ADAPTERS.OPENLOGIN,
         loginParams
       );

Since we made this post: users who had this happening to them every time they tried to sign in managed to do so for several hours, it then occurred again for one user (that we know of)

Could you please remove these and add them to your loginPramaters Record? Please check Creating Aggregate Verifier on the Web3Auth Dashboard | Documentation for reference.

This started happening after this configuration was set, ergo it was working fine for several others users. So, if it isn’t a systemic issue and it happens sporadically how’s changing our setup should effect anything?

Will give it a try anyway

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.