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:
- Existing users are able to login
- Login using Linkedin works, the problem is reproducible when signing in from the first time using google only
- This isn’t always reproduce on mobile - meaning if the same user tries again on mobile, it might work.
- Environment variables are set correctly
This is very crucial for us as we are unable to onboard users successfully as the past few days