Could not validate redirect

This is my code:

const [web3AuthNetwork, setWeb3AuthNetwork] = useState<WEB3AUTH_NETWORK_TYPE>("mainnet");
  const [chain, setChain] = useState<CHAIN_CONFIG_TYPE>("celo");

import { CHAIN_NAMESPACES, CustomChainConfig } from "@web3auth/base";

export const CHAIN_CONFIG = {
  mainnet: {
    displayName: "Ethereum Mainnet",
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: "0x1",
    rpcTarget: `https://rpc.ankr.com/eth`,
    blockExplorer: "https://etherscan.io/",
    ticker: "ETH",
    tickerName: "Ethereum",
  } as CustomChainConfig,
  mumbai: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: "0x13881", // hex of 80001, polygon testnet
    rpcTarget: "https://rpc.ankr.com/polygon_mumbai",
    displayName: "Polygon Mumbai Testnet",
    blockExplorer: "https://mumbai.polygonscan.com/",
    ticker: "MATIC",
    tickerName: "Matic",
  } as CustomChainConfig,
  celo: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: "0xa4ec", // hex of 42220, Celo mainnet
    rpcTarget: "https://celo-mainnet.infura.io/v3/cb60**e6a",
    displayName: "Celo Mainnet",
    blockExplorer: "https://explorer.celo.org",
    ticker: "CELO",
    tickerName: "CELO",
  } as CustomChainConfig,
  polygon: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    rpcTarget: "https://polygon-rpc.com",
    blockExplorer: "https://polygonscan.com/",
    chainId: "0x89",
    displayName: "Polygon Mainnet",
    ticker: "matic",
    tickerName: "Matic",
  } as CustomChainConfig,
  tezos: {
    chainNamespace: CHAIN_NAMESPACES.OTHER,
    displayName: "Tezos Ithacanet",
  } as CustomChainConfig,
} as const;

export type CHAIN_CONFIG_TYPE = keyof typeof CHAIN_CONFIG;


export const WEB3AUTH_NETWORK = {
  mainnet: {
    displayName: "Mainnet",
  },
  testnet: {
    displayName: "Testnet",
  },
  cyan: {
    displayName: "Cyan",
  },
} as const;

export type WEB3AUTH_NETWORK_TYPE = keyof typeof WEB3AUTH_NETWORK;

const web3AuthInstance = new Web3Auth({
          chainConfig: currentChainConfig,
          clientId,
          uiConfig: {
            appName: "Gream",
            appLogo: "https://web3auth.io/images/w3a-L-Favicon-1.svg",
            theme: "light",
            loginMethodsOrder: ["twitter", "google"],
            defaultLanguage: "en",
            primaryButton: "socialLogin",
          },
          enableLogging: true,
          web3AuthNetwork: 'mainnet',
        });

I tried all mainnet network keys, also whitelisted my domain. I’ve: Aqua mainnet, mainnet, Sapphire mainnet, none of them work.

@zkPlaty Could share the entire console logs errors as well.




Nothing specific. First screenshot is from pop-up itself

I just noticed env is set up wrong. Let me fix that see if it works

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.