Could not validate redirect on Vercel

  • SDK Version: 6.1.7
  • Platform: All
  • Browser screenshot:

Config code

const RPC_TARGET = process.env.NEXT_PUBLIC_RPC_TARGET as string
const WEB3AUTH_CLIENT_ID = process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID as string
const WEB3AUTH_NETWORK = process.env.NEXT_PUBLIC_WEB3AUTH_NETWORK as
  | 'testnet'
  | 'mainnet'

const chainConfig = {
  chainNamespace: CHAIN_NAMESPACES.EIP155,
  chainId: '0x13881', // hex of 80001, polygon testnet
  rpcTarget: RPC_TARGET,
  displayName: 'Polygon Mumbai Testnet',
  blockExplorer: 'https://mumbai.polygonscan.com/',
  ticker: 'MATIC',
  tickerName: 'Matic',
}

const web3auth = new Web3AuthNoModal({
  clientId: WEB3AUTH_CLIENT_ID,
  chainConfig,
  web3AuthNetwork: WEB3AUTH_NETWORK, // 'testnet' on local and 'mainnet' on production
})

Hi friends :sunny:

I am having connection issues with web3auth service in production.

In the dashboard, I have two projects, one on testnet:

and one on mainnet:

On my local dev environment (testnet) everything works fine. However, when I deployed to vercel, I get this message:

I triple checked, my env variables are well set in both env and I added whitelisted urls in the mainnet project.

I will very much appreciate your help :pray:
:seedling:

@david.nejar Thanks for reaching out.

Please note Sapphire is not yet supported for Plug n Play SDKs. Mainnet is in transition to Sapphire after which you can use it. You can follow this post for updates “Mainnet” Network Migration scheduled for 23rd July 2023