So I’ve configured Google Cloud 0Auth 2.0 and received a Client ID
. I used this to configure a verifier in Custom Auth called heimlabs-auth
. Further, I setup a plug and play project as well for which I received another clientId
.
The code snippet below, works locally but as soon as it’s hosted it gives the error mentioned below. I resolved the issue by passing the verifierClientId
to the adapter as well but ideally the verifier
itself should be sufficient.
- SDK Version: 6.1.5
- Platform: ReactJs
- Related to Custom Authentication? Please provide the following info too: (Optional)
- Type:
google
- Verifier Name:
heimlabs-auth
- Type:
Please provide the Web3Auth initialization and login code snippet below:
const clientId = process.env.REACT_APP_W3A_CLIENT_ID as string;
const verifier = process.env.REACT_APP_W3A_VERIFIER as string;
// const verifierClientId = process.env.REACT_APP_0AUTH_CLIENT_ID as string;
const web3AuthInstance = new Web3Auth({
web3AuthNetwork: "testnet",
chainConfig: currentChainConfig,
clientId,
uiConfig: {
defaultLanguage: "en",
theme: "light",
loginGridCol: 3,
primaryButton: "socialLogin",
},
enableLogging: true,
});
const adapter = new OpenloginAdapter({
adapterSettings: {
network: web3AuthNetwork,
clientId,
uxMode: 'redirect',
loginConfig: {
google: {
verifier,
typeOfLogin: "google",
showOnModal: true,
// clientId: verifierClientId
},
},
},
});
web3AuthInstance.configureAdapter(adapter);
subscribeAuthEvents(web3AuthInstance);
setWeb3Auth(web3AuthInstance);
await web3AuthInstance.initModal();
The error:
{"errorMsg":"Could not get result from torus nodes \n Error occurred while verifying paramsazip is not clientID 221898609709-obfn3p63741l5333093430j3qeiinaa8.apps.googleusercontent.com <my-google-0auth-client-id>",...