URGENT - Whitelist domain not working

I keep getting error saying

There seems to be some bug in the code. Please contact support to fix this.
could not validate redirect, please whitelist your domain: https://www.XXXXX.xyz for provided clientId

I have triple checked that ALL the domains are indeed whitelisted. This is blocking and delaying our launch.

This is for saphire mainnet. our testnet version works without problem.

@antonio Thanks for reaching out.

Sorry to hear about the issue you are facing. Are you on the latest SDK version 7?

Did you setup the project on Sapphire with the same name as the one on Testnet?

Have you specified the web3AuthNetwork parameter during the Web3Auth NoModal initialization ?
I’ll paste a snippet here for your reference on where should it go. For your case, please mention "sapphire_mainnet" as the parameter.

const web3auth = new Web3AuthNoModal({
  clientId: "", // Get your Client ID from Web3Auth Dashboard
  chainConfig: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: "0x1",
    displayName: "Ethereum Mainnet",
    blockExplorer: "https://etherscan.io",
    ticker: "ETH",
    tickerName: "Ethereum",
    rpcTarget: "https://rpc.ankr.com/eth", // This is the mainnet RPC we have added, please pass on your own endpoint while creating an app
  web3AuthNetwork: "sapphire_mainnet",

not sure if this is the cause, but make sure your whitelisted domain does not have trailing backslash. like https://www.domain.com will work but https://www.domain.com/ will not!

@vjgee this may be a good one for the team to fix and open up to make more forgiving, going to save you and a lot of developers a ton of headache.

1 Like