When asking for help in this category, please make sure to provide the following details:
- SDK Version(package.json): v8
- Platform: React
- Browser Console Screenshots: nightly.dualmint.com
- If the issue is related to Custom Authentication, please include the following information (optional):
- Verifier Name:
- JWKS Endpoint:
- Sample idToken (JWT):
Also, kindly provide the Web3Auth initialization and login code snippet below. This will help us better understand your issue and provide you with the necessary assistance.
I am facing an issue where whenever a user on the phone goes on their browser and connects to metamask, it connects but when they go back to the browser its not connected. According to a chat with a web3auth developer Ive upgrade my package to the latest version. The following is my code for initialization:
const chainConfig = {
chainNamespace: 'eip155',
chainId: chainConfigValue.properties.chainId, // Make sure this is a hexadecimal string, e.g., '0x1' for Ethereum Mainnet
rpcTarget: chainConfigValue.properties.rpcTarget,
// Optionally include displayName, blockExplorer, ticker, tickerName, and logo
};
// Create a privateKeyProvider with your chainConfig
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: { chainConfig },
});
// Define your Web3Auth options
const web3AuthOptions = {
clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENTID,
web3AuthNetwork: process.env.NEXT_PUBLIC_WEB3AUTH_NETWORK, // Use the appropriate network
privateKeyProvider, // Make sure to pass the privateKeyProvider here
};
// Create a new Web3Auth instance with your options
const web3auth = new Web3Auth(web3AuthOptions);
// Get the default external adapters
const adapters = await getDefaultExternalAdapters({
options: web3AuthOptions,
});
// Configure each adapter by adding it to your Web3Auth instance
adapters.forEach((adapter) => {
web3auth.configureAdapter(adapter);
});
// Initialize the Web3Auth modal
await web3auth.initModal();
// Connect and get the provider
const web3authProvider = await web3auth.connect();