Replies: 1 comment 4 replies
-
Hey @talentdev2020 Are you using something similar code? import { Web3AuthCore } from "@web3auth/core";
import { OpenloginAdapter } from "@web3auth/openlogin-adapter";
import { WALLET_ADAPTERS, CHAIN_NAMESPACES } from "@web3auth/base";
import { ethers } from "ethers";
const web3auth = new Web3AuthCore({
clientId: "YOUR_CLIENT_ID", // get it from Web3Auth Dashboard
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0x3", // ropsten, hex of 3
},
});
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
clientId: "YOUR-WEB3AUTH-CLIENT-ID",
network: "testnet",
uxMode: "popup",
loginConfig: {
jwt: {
name: "Name of your choice",
verifier: "YOUR-VERIFIER-NAME-ON-WEB3AUTH-DASHBOARD",
typeOfLogin: "jwt",
clientId: "YOUR-CLIENTID-FROM-SOCIAL-PROVIDER",
},
},
},
});
web3auth.configureAdapter(openloginAdapter);
await web3auth.init();
// Login
await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: "jwt",
extraLoginOptions: {
domain: "https://YOUR-DOMAIN", // if using Auth0, Cognito or Firebase.
verifierIdField: "sub",
},
});
const provider = new ethers.providers.Web3Provider(web3auth.provider); Also, try looking at our guides to see if anything matches your requirement or not. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I connected the web3auth using custom login
await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, ... )
After that, I got the ethers provider and tried to store to recoil, but showed error:
ethersProvider = new ethers.providers.Web3Provider(web3auth.provider); setEthersProvider(ethersProvider);
Beta Was this translation helpful? Give feedback.
All reactions