Hi there I followed the document https://web3auth.io/docs/guides/cognito and have set all parameters correctly. But when I run the app it breaks at
Constructing your key on localhost
After which it throws error on UI:
Unable to detect login share from the Auth Network. This may be due to slow internet connection. Check your internet speed and try again. If you're using a vpn, please turn it off.
Can someone have a look and tell me what could be wrong here?
code snippet:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const web3auth = new Web3AuthCore({ clientId: "", //client-id from web3auth app web3AuthNetwork: "mainnet", chainConfig: { chainNamespace: CHAIN_NAMESPACES.EIP155, chainId: "0x89", rpcTarget: 'https://polygon-mainnet.infura.io/v3/${REACT_APP_INFURA_ID}', }, });const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
uxMode: "popup",
loginConfig: {
jwt: {
name: "AWS Cognito Verifier",
verifier: "aws-cognito-verifier-gamersxpdapp",
typeOfLogin: "jwt",
clientId: "", //jwt-client-id
},
},
},
});
web3auth.configureAdapter(openloginAdapter);
await web3auth.init();
const provider = await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: "jwt",
extraLoginOptions: {
domain: "https://overwolf-integration.auth.us-east-1.amazoncognito.com",
verifierIdField: "email",
response_type: "token",
scope: "email profile openid",
},
});">
const web3auth = new Web3AuthCore({
clientId: “”, //client-id from web3auth app
web3AuthNetwork: “mainnet”,
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: “0x89”,
rpcTarget: ‘https://polygon-mainnet.infura.io/v3/${REACT_APP_INFURA_ID}’,
},
});const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
uxMode: “popup”,
loginConfig: {
jwt: {
name: “AWS Cognito Verifier”,
verifier: “aws-cognito-verifier-gamersxpdapp”,
typeOfLogin: “jwt”,
clientId: “”, //jwt-client-id
},
},
},
});
web3auth.configureAdapter(openloginAdapter);await web3auth.init();
const provider = await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: “jwt”,
extraLoginOptions: {
domain: “https://overwolf-integration.auth.us-east-1.amazoncognito.com”,
verifierIdField: “email”,
response_type: “token”,
scope: “email profile openid”,
},
});
Thank you in advance for your help. Cheers!
Originally posted by: ashishspacemishra
Check the discussion at: https://github.com/orgs/Web3Auth/discussions/1335