I am trying to use web3auth to get the idToken but it is comping up empty. I have tried with the the passwordless email and Google providers and both have the same issue. I am testing on testnet.
Only upside I see is that the error is consistent, which differs from what I’ve found in the forums.
What could be wrong?
- SDK Version: 6.1.1
- Platform: Brave browser
- Browser Console Screenshots:
const chainConfig = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
displayName: "Polygon",
ticker: "MATIC",
tickerName: "Polygon",
// Testnet
chainId: "0x13881",
rpcTarget: "https://rpc.ankr.com/polygon_mumbai",
};
const web3auth = new Web3AuthNoModal({
clientId,
web3AuthNetwork: "testnet",
chainConfig,
});
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: { chainConfig } as unknown as EthereumPrivKeyProviderConfig,
});
// Configure how we want web3auth to handle MFA and other settings it allows
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
network: "testnet",
},
privateKeyProvider,
});
web3auth.configureAdapter(openloginAdapter);
await web3auth.init();
const web3authProvider = await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: "email_passwordless",
extraLoginOptions: {
login_hint: "john@doe.com",
},
});
I’ve noticed that if I used my testnet client id with the cyan network, it works correctly locally. It does not work in our live domain with this set up.
I also tried using the cyan client id with the cyan network in our live domain and it does the same thing, idToken comes up empty.