Email authorization not working after switching to Mainnet (Modal SDK)

Just after signing in via email (both when restoring session via web3auth cookies, or clean login and entering confirmation number) it tries to send getHealth request to mainnet:
image and gets 403 in response.

Though I believe it should not send anything into net, when using email. As a result login fails (though web3auth cookies are set, it thinks it is logged in).

Happens only if authadapter is configured for mainnet.
If changed to devnet - everything is fine, no errors.
Wallet authorization works fine in both cases.

@web3auth/auth-adapter”: “^9.7.0”,
@web3auth/base”: “^9.7.0”,
@web3auth/default-solana-adapter”: “^9.7.0”,
@web3auth/modal”: “^9.7.0”,
@web3auth/solana-provider”: “^9.7.0”,

Thanks for sharing the details, Dmitriy! Here’s a summary of your issue for the support team:


Issue Summary

  • SDK: Web3Auth Plug and Play (PnP) Web SDK (Modal SDK)
  • SDK Versions:
  • Platform: Web
  • Problem:
    • After switching to Mainnet and signing in via email, the SDK sends a getHealth request to Mainnet, which you believe should not happen for email logins.
    • This results in a login failure, even though web3auth cookies are set and the session appears restored.
    • The issue only occurs when using an injected adapter pointing to Mainnet; it works fine on Devnet.
  • Screenshots:
    • You’ve provided network and error screenshots for reference.

Next Steps / Suggestions:

  1. Check Network Configurations:
    Ensure your injected adapter is configured correctly for Mainnet. Sometimes, endpoint mismatches or auth network misconfigurations can cause such issues.
    See: Configuring Network and Adapters

  2. Email Auth Flow:
    The getHealth request is typically used to check the node’s status. If you’re using email login, make sure the adapter and provider are not forcing a blockchain connection at this step (especially if using Solana Mainnet).
    See: Email Login with Web3Auth

  3. Adapter Priority:
    If you have multiple adapters (e.g., injected + email), ensure the correct one is prioritized for email logins.
    See: Adapter Configuration

  4. Debugging:

    • If possible, please share your Web3Auth initialization and login code snippets.
    • Double-check that the network parameter in your initialization matches your intended environment.

Questions for You (if you can provide):

  • Could you share your Web3Auth initialization and login code snippets? This will help us check if there’s a misconfiguration.
  • Are you using a custom verifier or the default Web3Auth email verifier?

Let us know if you can provide the code snippet or any additional details. Meanwhile, the support team will review your logs and screenshots.

Thank you for your detailed report!

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.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours