When asking for help in this category, please make sure to provide the following details:
- SDK Version(package.json): 9.0.2
- Platform: Windows
- Browser Console Screenshots:
- If the issue is related to Custom Authentication, please include the following information (optional):
- Verifier Name:
- JWKS Endpoint:
- Sample idToken (JWT):
Also, kindly provide the Web3Auth initialization and login code snippet below. This will help us better understand your issue and provide you with the necessary assistance.
const web3auth = new Web3AuthNoModal({
clientId,
privateKeyProvider,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
});
web3auth.configureAdapter(authAdapter); // authAdapter initialized above
return web3auth;
}, []);
Then trying to connect with Google with optional MFA
const loginWithGoogle = useCallback(async (): Promise<void> => {
try {
if (!web3auth) {
throw new Error('Web3auth not initialized');
}
const connected = await web3auth.connectTo(WALLET_ADAPTERS.AUTH, {
loginProvider: LOGIN_PROVIDER.GOOGLE,
mfaLevel: 'optional',
curve: 'secp256k1',
});
if (connected === null) {
throw new Error('Error connecting to Google');
}
} catch (e: unknown) {
if (e instanceof Error) {
throw new Error(e.message);
} else {
throw new Error('An unknown error occurred during login with Google');
}
}
}, [web3auth]);