Archived Content from Web3Auth Community
This topic was originally posted by jeanlouis on 6/27/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.
Please provide the following details too when asking for help in this category:
-
SDK Version: ^6.1.1
-
Platform: Remix.js/React.js
-
Browser Console Screenshots:
-
Related to Custom Authentication? Please provide the following info too: (Optional)
- Verifier Name:
- JWKS Endpoint:
- Sample idToken(JWT)
Please provide the Web3Auth initialization and login code snippet below:
Example from your documentation at Wallet Connect V2 Adapter | Documentation | Web3Auth
Attempted this:
const web3auth = new Web3AuthNoModal({ clientId: WEB_3_AUTH_CLIENT_ID, chainConfig: { chainNamespace: CHAIN_NAMESPACES.EIP155, chainId: `0x${Number(getDefaultChainId()).toString(16)}`, rpcTarget: 'https://<subdomain>.quiknode.pro/<slug>/', }, });useEffect(() => {
(async () => {
const defaultWcSettings = await getWalletConnectV2Settings(
‘eip155’,
[1, 5, 137],
‘project_id’
);
console.log(‘web3auth’);
const walletConnectV2Adapter = new WalletConnectV2Adapter({
…defaultWcSettings,
});
console.log(‘web3auth’);
// //
web3auth.configureAdapter(walletConnectV2Adapter);
await web3auth.init();
})();
}, );
and this:
Attempted this:
const web3auth = new Web3AuthNoModal({ clientId: WEB_3_AUTH_CLIENT_ID, chainConfig: { chainNamespace: CHAIN_NAMESPACES.EIP155, chainId: `0x${Number(getDefaultChainId()).toString(16)}`, rpcTarget: 'https://<subdomain>.quiknode.pro/<slug>/', }, });useEffect(() => {
(async () => {
const defaultWcSettings = await getWalletConnectV2Settings(
‘eip155’,
[1, 5, 137],
‘project_id’
);
console.log(‘web3auth’);
const walletConnectV2Adapter = new WalletConnectV2Adapter({
…defaultWcSettings,
chainConfig: { //<– passing in chainConfig as error suggests
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId:0x${Number(getDefaultChainId()).toString(16)},
rpcTarget:
‘https://<subdomain>.quiknode.pro/<slug>/’,
},
});
console.log(‘web3auth’);
// //
web3auth.configureAdapter(walletConnectV2Adapter);
await web3auth.init();
})();
}, );
Same result.
Please update your docs, or provide guidance, this crashes the whole flow which prevents other connectors from working properly
