Archived Content from Web3Auth Community
This topic was originally posted by manuel.cattelan on 11/23/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.
When asking for help in this category, please make sure to provide the following details:
- SDK Version: 7.1.2
- Platform: Web application - React.js
- Browser Console Screenshots: No error returned in browser console.
- 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 currentChainConfig = { chainNamespace: CHAIN_NAMESPACES.EIP155, rpcTarget: 'https://polygon-rpc.com', blockExplorer: 'https://polygonscan.com/', chainId: '0x89', displayName: 'Polygon Mainnet', ticker: 'matic', tickerName: 'Matic', }const web3AuthNetwork = {
displayName: âMainnetâ
}const web3AuthInstance = new Web3AuthNoModal({
clientId: clientId,
chainConfig: currentChainConfig,
web3AuthNetwork: web3AuthNetwork,
});const privateKeyProvider = new EthereumPrivateKeyProvider({
config: { chainConfig: currentChainConfig },
});
const openLoginAdapter = new OpenloginAdapter({
privateKeyProvider,
adapterSettings: { uxMode: âredirectâ, replaceUrlOnRedirect: false },
});web3AuthInstance.configureAdapter(openLoginAdapter);
await web3AuthInstance.init()const loginWeb3 = async (loginProvider: string) => {
if (!web3Auth) {
console.log(âweb3auth not initialized yetâ);
return;
}
const localProvider = await web3Auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: loginProvider,
});
setWalletProvider(localProvider!);
};
When using uxMode: redirect and replaceUrlOnRedirect: false, whenever the login succeeds and web3auth returns to our applicationâs domain, parameters from the original URL are stripped anyways.