Discuss about the error could not validate redirect, please whitelist your domain

Subject: Issue with Social Sign-In Integration - Validation Error

Message:

Hello [Web3auth],

I hope this message finds you well. I am currently working on integrating social sign-in functionality into my website, and I’ve encountered an issue that I could use some assistance with.

Problem Description: When attempting to integrate social sign-in using your service, I received the following error message:

Details:
///
This type of error will be seen

There seems to be some bug in the code. Please contact support to fix this.

could not validate redirect, please whitelist your domain: https://e-sign2.vrinsoft.in for provided clientId BPlD7O…(Clientid) at https://dashboard.web3auth.io. Also, this project is on mainnet network. Please ensure the the used Client ID belongs to this network.

  1. The Client ID I am using: BPlD7O…

  2. I am using thePolygon Testnet network for this project.
    Questions:

  3. How can I resolve the “could not validate redirect” issue?

  4. What steps should I take to whitelist my domain for the provided Client ID?

  5. Is there a way to confirm that the Client ID I am using belongs to the mainnet network?

I would greatly appreciate your guidance on resolving this issue and ensuring a successful integration of social sign-in into my website.

Thank you for your time and assistance.

Best regards, [Rakholiya jay]

@vrinsoft014 Welcome Aboard!

  1. The reason here might be related to wrong web3authNetwork parameter in the web3auth constructor code. Just make sure the client id and verifier are on the same network(Mainnet, Cyan, Aqua or Testnet whichever applies) for it to work properly.

  2. You can refer to our documentation Whitelisting your App Domain or Deep Links | Documentation | Web3Auth for help

  3. You can check the verifier details on the Web3Auth dashboard to ensure which Client ID belong to which network. Be sure to check the status of the verifier to be LIVE as well. You can refer to Creating Verifiers on the Web3Auth Dashboard | Documentation | Web3Auth for more information.

You will need to specify the web3AuthNetwork parameter during the Web3Auth Modal initialization.

I’ll paste a snippet here for your reference on where should it go.

const web3auth = new Web3Auth({
          clientId,
          chainConfig: {
            chainNamespace: CHAIN_NAMESPACES.EIP155,
            chainId: "0x89", // 
            rpcTarget: "https://rpc.ankr.com/polygon", // This is the public RPC we have added, please pass on your own endpoint while creating an app
          },
          // add the below parameter as "Testnet / Mainnet/Cyan/Aqua"
          web3AuthNetwork: "cyan", //Cyan is added as an example. Check which network you are on and add that
        });
1 Like

Hey @vjgee,

really appreciate your prompt response on the matter, I just wanted to provide more context

  • I am using plug and play - Pop up model for social sign in and I didnt setup any manual verifier and please let me correct if I am wronge I dont think so in plug and play i need to manually set up any verifier

  • And I have sub-domain for the web-app and also my web-app my smartcontract and enviorment currently I have is on test net [Mumbai testnet]

  • Apart from this I doubled check the clientId its correct and working perfectly fine in my local host.

let me know any additional details you want from my side

You have to setup the verifier on the Dashboard and deploy it on the respective network:

But I am using Plug and play ?

Hey @vrinsoft014, have you whitelisted the domains you are using?

Yes and that error resolved thank you so much

1 Like