There seems to be some bug in the code. Please contact support to fix this

Hello,

We have a problem with the login of one user :



user try to connect with email_passwordless, he receives the code his mailbox and when he put in the web3auth no modal he gets this error. I specify that we only have this problem with this user, other users can connect perfectly. Looks like there is a 500 error (look 2nd screenshot) on your end when checking the code

package information :
@web3auth/base”: “^8.8.0”,
@web3auth/no-modal”: “^8.10.2”,
@web3auth/web3auth-wagmi-connector”: “^6.0.0”,

Can you help us ?

Thank you !

Hello Lucas,

Thanks for reaching out! I understand you’re facing an issue with a specific user’s login using the email_passwordless method. Let’s gather the details for the support team to assist you better.

Here’s a summary of what you’ve provided:

  • SDK Details:
    • Plug n Play
  • SDK Version Numbers:
    • @web3auth/base: ^8.8.0
    • @web3auth/no-modal: ^8.10.2
    • @web3auth/web3auth-wagmi-connector: ^6.0.0
  • Platform: Not specified, but likely web-based
  • Issue Description: A specific user encounters a 500 error during login, after entering the code sent to their mailbox.

Additional Information from your message:

  • The problem exists only for one user, while others can connect without issue.
  • You noted a 500 error in the second screenshot.

Screenshots Provided:

  • Three images included, which might contain useful error details.

To help clarify further for the support team, could you share the following if it’s available?

  • Web3Auth Initialization & Login Code Snippets (if possible)
  • The Verifier Name (if relevant)

Thank you for your patience! A support team member will get back to you shortly to resolve this issue.

Best,
[Your Name]

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

useEffect(() => {
    const init = async () => {
      try {
        let chainConfig: CustomChainConfig;
        if (process.env.NEXT_PUBLIC_ENVIRONMENT == "dev") {
          chainConfig = {
            chainNamespace: CHAIN_NAMESPACES.EIP155,
            chainId: "0x13882",
            rpcTarget: "https://polygon-amoy.g.alchemy.com/v2/" + ALCHEMY_KEY,
            ticker: CurrencyType.MATIC,
            tickerName: "Polygon",
            displayName: "Polygon Testnet",
            blockExplorerUrl: polygonAmoy.blockExplorers.default.url,
          };
        } else {
          chainConfig = {
            chainNamespace: CHAIN_NAMESPACES.EIP155,
            chainId: "0x89",
            rpcTarget:
              "https://polygon-mainnet.g.alchemy.com/v2/" + ALCHEMY_KEY,
            ticker: CurrencyType.MATIC,
            tickerName: "Polygon",
            displayName: "Polygon Mainnet",
            blockExplorerUrl: polygon.blockExplorers.default.url,
          };
        }

        const web3authInstance = new Web3AuthNoModal({
          clientId: WEB3AUTH_CLIENT_ID,
          chainConfig,
          web3AuthNetwork: "mainnet",
        });

        const privateKeyProvider = new EthereumPrivateKeyProvider({
          config: { chainConfig },
        });

        const openloginAdapter = new OpenloginAdapter({
          privateKeyProvider,
          adapterSettings: {
            uxMode: "redirect",
          },
        });
        web3authInstance.configureAdapter(openloginAdapter);

        setWeb3auth(web3authInstance);

        await web3authInstance.init();
        if (web3authInstance.provider) setProvider(web3authInstance.provider);
      } catch (error) {
        throw new Error(`Web3Auth ERROR: ${error}`);
      }
    };
    init();
  }, []);



  const getProviderConfig = (
    loginProvider: Web3AuthProvider,
    email?: string,
  ) => {
    switch (loginProvider) {
      case Web3AuthProvider.APPLE:
        return { loginProvider: "apple" };
      case Web3AuthProvider.GOOGLE:
        return { mfaLevel: "none", loginProvider: "google" };
      case Web3AuthProvider.EMAIL:
        return {
          loginProvider: "email_passwordless",
          mfaLevel: "none",
          extraLoginOptions: {
            login_hint: email,
          },
        };
    }
  };

  const web3AuthLogin = useCallback(
    async (loginProvider: Web3AuthProvider, email?: string) => {
      if (!web3auth) return;

      const providerConfig = getProviderConfig(loginProvider, email);

      try {
        await web3auth.init();
        const web3authProvider = await web3auth.connectTo(
          WALLET_ADAPTERS.OPENLOGIN,
          providerConfig,
        );
        setProvider(web3authProvider);
      } catch (error) {
        throw new Error(`Failed to connect with wallet: ${error}`);
      }
    },
    [web3auth],
  );

I insist that the code works and that the problem is only on 1 user. I insist that the code works and that the problem is only on 1 user. the user receives the code by email but when he validates it, there is an error (see screenshot).

Thank you.

Hey @lucasss,

I noticed that you’re using an older version. Could you please try upgrading to the latest one? Additionally, I see that you’re currently on the mainnet network. Can you test your project on the sapphire_devnet or testnet instead? If this is a live project, could you let me know which pricing plan you’re on?

Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.