Getting this error after updating to the latest version
could not validate redirect, please whitelist your domain: https://...vercel.app for provided clientId ... at https://dashboard.web3auth.io. Also, this project is on testnet network. Please ensure the the used Client ID belongs to this network.
- SDK Version:
"@web3auth/ethereum-provider": "7.0.2", "@web3auth/metamask-adapter": "7.0.1", "@web3auth/no-modal": "7.0.1", "@web3auth/openlogin-adapter": "7.0.1",
- Platform: Web
- Browser Console Screenshots: below
- Related to Custom Authentication? Please provide the following info too: (Optional)
- Verifier Name:
- JWKS Endpoint:
- Sample idToken(JWT)
- Preview: https://supersafe-ui-git-feature-d-1241-openlogin-adap-1d55c7-supersafe.vercel.app/login/
Please provide the Web3Auth initialization and login code snippet below:
const web3AuthConfig = {
sessionTime: 86400,
enableLogging: false,
clientId: '...',
web3AuthNetwork: 'testnet',
chainConfig: {
chainNamespace: 'eip155',
chainId: '0x5',
displayName: 'Ethereum Goerli Testnet',
rpcTarget: '...',
ticker: 'ETH',
tickerName: 'Ethereum Goerli Testnet Token',
blockExplorer: 'https://etherscan.io'
}
}
const web3auth = new Web3AuthNoModal(web3AuthConfig)
const privateKeyProvider = new EthereumPrivateKeyProvider({ config: { chainConfig: web3AuthConfig.chainConfig } })
const originData = await getSignedPreviewUrl()
const openloginAdapter = new OpenloginAdapter({
privateKeyProvider,
web3AuthNetwork: web3AuthConfig.web3AuthNetwork,
adapterSettings: {
network: web3AuthConfig.web3AuthNetwork,
originData
}
})
web3auth.configureAdapter(openloginAdapter)
const metamaskAdapter = new MetamaskAdapter()
web3auth.configureAdapter(metamaskAdapter)
await web3auth.init()