Hi there,
I have a user-facing app which I was hoping to launch today, but last night, all of a sudden - the web3auth stopped working.
Upon further inspection I can see the following error is being thrown:
OpenLogin - RPC Error: could not validate redirect, please whitelist your domain: https://wtdkwg2aml4pyi2a.anvil.app for provided clientId BIEreSmO4.... at https://dashboard.web3auth.io

However, this does not make sense as the domain is indeed already whitelisted for this clientId. I have tried removing it and adding it again to the whitelist but no luck.

I'm pretty certain this is not something on my end, as I haven't changed anything. It was working one moment and then it wasn't the next. However, any advice on how I may be able to debug this further would be appreciated.
I don't think this is related but sometimes after the above error, the following error is also thrown:

Best,
Pat
Originally posted by:
pat-mw Check the discussion at:
https://github.com/orgs/Web3Auth/discussions/940
For completeness sake, here is the code I'm using to instantiate the modal
web3auth = new window.Modal.Web3Auth({
clientId,
chainConfig: {
chainNamespace: “eip155”,
chainId: “0x13881”,
displayName: “Polygon TestNet (MUMBAI)”,
blockExplorer: “https://mumbai.polygonscan.com/”,
ticker: “MATIC”,
tickerName: “Matic”,
rpcTarget: “https://polygon-mumbai.g.alchemy.com/v2/<hidden rpc target>”,
},
uiConfig: {
theme: “dark”,
defaultLanguage: “en”,
loginMethodsOrder: [“google”, “facebook”, “twitter”, “email_passwordless”],
// appLogo: “https://community/community/uploads-ssl.webflow.com/6358e991f1dde9bcc1825b59/6358f48c0f7983bc1111541b_logo-white.png”, // Your App Logo Here
appLogo: “./_/theme/icons/logo-animation.gif”, // Your App Logo Here
}
});
await web3auth.initModal({
modalConfig: {
[“openlogin”]: {
label: “openlogin”,
loginMethods: {
reddit: {
showOnModal: false,
},
discord: {
showOnModal: false,
},
twitch: {
showOnModal: false,
},
apple: {
showOnModal: false,
},
github: {
showOnModal: false,
},
line: {
showOnModal: false,
},
kakao: {
showOnModal: false,
},
wechat: {
showOnModal: false,
},
weibo: {
showOnModal: false,
}
},
},
[“torus-evm”]: {
showOnModal: false,
},
[“wallet-connect-v1”]: {
showOnModal: false,
},
[“metamask”]: {
showOnModal: false,
},
}
});
And for actually logging in:
async function web3connect(instance){
console.log(`connecting via instance: ${instance}`)
provider = await instance.connect();
console.log(`connected: ${provider}`)
return provider;
}
Originally posted by:
pat-mw