URGENT! Whitelisted Domains are not working even after whitelisting. PLEASE RESPOND ASAP!

When asking for help in this category, please make sure to provide the following details:

image
SDK version 9.5.3
Web and Android but mainly web, then I will use AppMySite
The console didn’t have anything except for this warning:
image


const clientId =
  "BKVU0F8x9OV8Ty42fYg5a2QxcLKucvaSpIGj-uv2JMOfrN8axhggKo-c3q********************";

const chainConfig = {
  chainNamespace: CHAIN_NAMESPACES.EIP155,
  chainId: "0xaa36a7",
  rpcTarget: "https://rpc.ankr.com/eth_sepolia",
  displayName: "Ethereum Sepolia Testnet",
  blockExplorerUrl: "https://sepolia.etherscan.io",
  ticker: "ETH",
  tickerName: "Ethereum",
  logo: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
};

const privateKeyProvider = new EthereumPrivateKeyProvider({
  config: { chainConfig },
});

const web3auth = new Web3Auth({
  clientId,
  web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET
  privateKeyProvider,
});
 useEffect(() => {
    const init = async () => {
      try {
        await web3auth.initModal();
      } catch (e) {
        console.log("Error initializing modal", e);
      }
      try {
        setProvider(web3auth.provider);

        if (web3auth.connected) {
          setLoggedIn(true);
          const user = (await web3auth.getUserInfo()) as any;
          setUserInfo(user);
          if (user.email) {
            localStorage.setItem("userEmail", user.email);
            try {
              await createUser(user?.email, user?.name || "Anonymous User");
            } catch (error) {
              console.error("Error creating user:", error);
              // Handle the error appropriately, maybe show a message to the user
            }
          } else if (user.oAuthIdToken) {
            try {
              await createUser(user.email, user?.name || "Anonymous User");
            } catch (error) {
              console.error("Error creating user:", error);
              // Handle the error appropriately, maybe show a message to the user
            }
          }
        }
      } catch (error) {
        console.error("Error initializing Web3Auth:", error);
      } finally {
        setLoading(false);
      }
    };

    init();
  }, []);

I’ve also whitelisted the domains in my web3Auth dashboard:

I need this project done ASAP so please help me!

Hi Shree M! I understand the urgency and I’m here to help you resolve the whitelisting issue with your Web3Auth setup.

Based on what you’ve shared:

  • SDK Details: PnP Web SDK
  • SDK Version: 9.5.3
  • Platform: Web and Android (primarily Web)

Let’s take a look at the likely areas that could be causing issues with whitelisting:

Check List:

  1. Correct Domains: Double-check that you’ve entered the correct domain names in your Web3Auth dashboard, without any typos or omitted subdomains (like www prefix).

  2. Console Warning: The warning in the console may indicate missing headers or incorrect network configuration if it’s related to setup. The exact warning isn’t visible, can you please provide more details about the message?

  3. Web3Auth Initialization: The part of your code related to initializing Web3Auth looks good, but make sure the Internet connection and RPC target are accessible from your environment.

  4. Network Configuration: Ensure that the web3AuthNetwork configuration reflects your intended usage. If using MAINNET, make sure the environment aligns with the intended network usage.

Proposed Steps:

  • Recheck Whitelisted Domains: Go into your Web3Auth dashboard and ensure there are no trailing spaces or other anomalies in the whitelisted domain fields.

  • Confirm Network Access: Verify that your development environment has proper network access and the RPC endpoint is reachable.

  • Browser Console: If you could provide more context or a full message from the console warning, it could help pinpoint the problem.

I hope these steps get you back on track quickly! If the issue persists, feel free to share additional console logs or any specific error messages you encounter when interacting with Web3Auth. The support team will be here to assist you further. Good luck with your project!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

1 Like

I’ve done of all of this and thats all the console shows. I don’t have any subdomains in my url. Please help ASAP. Thank you!

Hi @shree.manickaraja,

I took a look at your website here: https://waste-easy.vercel.app/

I was able to log in using all the methods you have. Can you let me know which ones are causing you trouble?

Also, I noticed you have a banner saying that only Google and email passwordless work. Instead, you can choose which ones to show. You can also customize the modal logins by using this: Whitelabel Plug n Play Modal | Documentation | Web3Auth