Two way to connect with two mail - Redirect to one account

Hi,

I have an issue with one of our user.

He usually connect via Email. One day he clicked on Google Connect by mistake and connect via another mail.

Today, when i tried to connect via email, he’s redirecting directly to the second account.

Please let me know if you need more explanations

Hi Julien,

Thank you for reaching out!

It sounds like the user is getting automatically redirected to the second email account when trying to log in via the initial email. This might be caused by session cookies or cached data from the previous login.

To better assist you, could you please provide the following additional details:

  • Platform: Are you using Web, iOS, or Android?
  • Web3Auth Initialisation & Login Code Snippets: This helps us understand the exact flow and possibly identify any issues.

In the meantime, a quick solution might be to clear the browser’s cache and cookies or try logging in using an incognito/private window. This often helps reset any cached sessions or cookies.

This response was generated by the Web3Auth Bot. A member of the Web3Auth team will follow up with a detailed response to help with your query.

Hi,

We already tried everything you mentionned.

Also different browers.

  • Platforme : Web

Hey @JulienD

This is expected behaviour of our SDKs, different login providers and verifiers give different keys. Users are expected to login using the same method they logged in for the first time in order to get the same keys. You can read more about this here: https://web3auth.io/docs/troubleshooting/different-private-key

For the particular usecase of yours, I’d recommend to try out our aggregate verifier approach: https://web3auth.io/docs/auth-provider-setup/aggregate-verifier
Using this you can aggregate multiple login providers into a single one.

Hi ! Let me explain me a bit better :

When the user logs in using his Mail, he’s incorrectly redirected to another account that is associated with a different email address. Despite using the correct email during login, the system seems to authenticate them with the credentials or session of a previously logged-in account done via Google Connect and a different mail than the previous one

What We’ve Tried:

  • Clearing browser cache, cookies, and OAuth sessions.
  • Attempting the login on different devices and browsers, with the same issue occurring.

Anyone can help me here ?

May i please ask if anyone can help here ?

Hey, can you please share the SDK you are using. If you are using any custom verifier, please share the details. We’ll also be requiring the login code snippet, and user’s two different email address along with the address they are getting.

SDK version : 9.0.2

no custom verifier is being used

Can you please share the different email address user is using.

Connexion :
“Google Connect” bubulio23@gmail.com
Via classic Mail : lionel.bubu@free.fr

Thanks, will check and update

Thanks a lot ! Appreciate

Hey Guys ! Any news on this ?

Hey @JulienD we checked in the metadata, we can’t find any address associated with bubulio23@gmail.com. Please check if the session is not cached. Also, please share the Web3Auth configuration, and login code snippets to verify.

web3auth config

const web3AuthOptions: Web3AuthOptions = {
  clientId,
  web3AuthNetwork: WEB3AUTH_NETWORK.CYAN,
  uiConfig: {
    uxMode: "",
    appName: "*****",
    appUrl: "https://web3auth.io/",
    theme: {
      primary: "#7ed6df",
    },
    logoLight: "https://web3auth.io/images/web3authlogodark.png",
    logoDark: "https://web3auth.io/images/web3authlogodark.png",
    defaultLanguage: "en", // en, de, ja, ko, zh, es, fr, pt, nl, tr
    mode: "auto", // whether to enable dark mode. defaultValue: auto
    useLogoLoader: true,
  },
  privateKeyProvider,
  sessionTime: 86400, // 1 day
}


 this.web3auth = new Web3Auth(web3AuthOptions);
    this.openloginAdapter = new OpenloginAdapter({
      loginSettings: {
        mfaLevel: "none",
        extraLoginOptions: {
          flow_type: "link",
        },
      },
      adapterSettings: {
        uxMode: "redirect",
        whiteLabel: {
          appName: "*****",
          defaultLanguage: "en",
          mode: "dark",
          logoLight: "https://web3auth.io/images/web3authlogodark.png",
          logoDark: "https://web3auth.io/images/web3authlogodark.png",
        },
      },
    });
    this.web3auth.configureAdapter(this.openloginAdapter);

Thanks Dean for the details !
@Ayush Just fyi Dean and I are working together :slight_smile:

Hey @JulienD,

After reviewing the code, I couldn’t find any major issues except for uxMode being set as an empty string. Please make sure to set it to either “popup” or “redirect”. This is the first time we’ve come across this problem, and we were unable to replicate it locally. Here are a few steps that might help resolve it:

  1. It looks like your code is from an older SDK version. Please update to the latest version (v9). You can refer to the Migration Guide here: PnP Modal SDK - v8 to v9 | Documentation | Web3Auth.
  2. Could you check if the same behavior occurs on our demo site or playground? You can test it here: https://demo.web3auth.io or https://pnp-modal-playground.vercel.app/.
  3. If the issue persists after updating the SDK, could you provide us with a jam.dev recording of the issue? If you prefer not to share it here, I can give you my Telegram so you can send it there. With the logs and network calls, we’ll be able to diagnose the issue more effectively.

Hi @yashovardhan please can you provide your telegram or discord account username please so i can provide the jam recording.

kind regards

Thank you @yashovardhan i have messaged you on telegram under the name dean_dev