Web3Auth stopped working on my website suddenly

When asking for help in this category, please make sure to provide the following details:

  • SDK Version(package.json): 8
  • Platform: explore.dualmint.com
  • Browser Console Screenshots:
  • 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.

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
                uiConfig: {
                    appName: 'Dualmint',
                    mode: 'dark', // light, dark or auto
                    logoLight: '/LogoLight.png',
                    logoDark: '/LogoDark.png',
                    defaultLanguage: 'en', // en, de, ja, ko, zh, es, fr, pt, nl
                    loginGridCol: 3,
                    primaryButton: 'socialLogin', // "externalLogin" | "socialLogin" | "emailLogin"
                },
            };

            // 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();

MY MODAL IS NOT WORKING ON MY MAINNET: https://explore.dualmint.com/

Can someone help regarding this?

Hey @dilshercareers

I just tried your app, and upon clicking Login, I see a popup that says to select either Ethereum or Polygon network; I am assuming that clicking either of these triggers the login method, web3auth.connect(). Meanwhile, can you add enableLogging: true to the web3ath init to check where this is breaking?

On another note, did you whitelist this domain on your project’s web3auth dashboard?

yes i have whitelisted my domain. I dont get what you mean by enablelogin true. Also I have added consoles and its failing in the line:
await web3auth.initModal();

Please share the error logs.

Ive spotted the error. When the package is 8.3.0, it crashes, but at 8.0.1 it works! So Im not sure if i should update the packages.

hi @dilshercareers

I hope you are doing great. @shahbaz is asking if you can share the error logs that you are seeing or the screenshot of your console.

Please check our documentation to enable logs: https://web3auth.io/docs/sdk/pnp/web/no-modal/initialize#web3authnomodaloptions

thanks a lot and hope we can help you to solve this issue.