In production i’m getting this error even if i whitelisted the domain. In localhost all is working fine.
REACT CODE:
useEffect(() => {
const initWeb3Auth = async () => {
const web3AuthInstance = new Web3Auth({
clientId:
'BG4KbPVXXXXX.....XXXXXXXX3l9XlPA',
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: '0x61',
rpcTarget:
'https://XXXXXXXX.bsc-testnet.quiknode.pro/XXXXX/',
},
modalZIndex: '99998',
});
setWeb3Auth(web3AuthInstance);
await web3AuthInstance.initModal();
setProvider(web3AuthInstance.provider);
setLoggedIn(true);
};
initWeb3Auth();
}, []);
GOT THIS ERROR ONCE I TRY TO LOGIN:
Something went wrong
There seems to be some bug in the code. Please contact support to fix this.
could not validate redirect, please whitelist your domain: https://XXXXXXXXXX.app for provided clientId BGXXXXXXX…XXXXXXlPA at https://dashboard.web3auth.io.
Also, this project is on mainnet network. Please ensure the the used Client ID belongs to this network.