Getting different account for different login methods. I am using Aggregate Multiple Providers

const web3AuthOptions: IWeb3AuthCoreOptions = {
clientId,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
privateKeyProvider: ethereumPrivateKeyProvider,
}
const web3auth = new Web3AuthNoModal(web3AuthOptions);

const authAdapter = new AuthAdapter({
  adapterSettings: {
    loginConfig: {
      google: {
        verifier: "web3-auth-custom",
        verifierSubIdentifier: "web3auth-google",
        typeOfLogin: "google",
        clientId: "519228911939-cri01h55lsjbsia1k7ll6qpalrus75ps.apps.googleusercontent.com",
      },
      twitterauth0:{
        verifier: "web3-auth-custom",
        verifierSubIdentifier: "web3auth-twitter",
        typeOfLogin: "twitter",
        clientId:'IxHigCVURWlRC6dL5olo9nu5pHqNw6lz'
        
      },
      email_passwordless: {
        verifier: "web3-auth-custom",
        verifierSubIdentifier: "web3auth-emailpasswordless",
        typeOfLogin: "email_passwordless",
        clientId: clientId
      }
    },
  },
  privateKeyProvider: ethereumPrivateKeyProvider,
});

web3auth.configureAdapter(authAdapter);

await web3auth.init();

it is giving me same address for google and emal passwordless but different for twitter

Hi Amit,

Thanks for reaching out! I understand you’re facing an issue with different accounts for different login methods while using the Aggregate Multiple Providers feature in the PnP Web SDK. Here’s a summary of the details you’ve provided:

  • SDK Details: PnP Web SDK
  • Platform: Not explicitly mentioned, but assuming it’s JavaScript based on the code snippet.
  • Issue: Different accounts for different login methods (same for Google and email/passwordless, different for Twitter).
  • Login Methods: Google, Twitter, and Email Passwordless.

Here’s a snippet of the code you shared for clarity:

const web3AuthOptions: IWeb3AuthCoreOptions = {
    clientId,
    web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
    privateKeyProvider: ethereumPrivateKeyProvider,
};
const web3auth = new Web3AuthNoModal(web3AuthOptions);

const authAdapter = new AuthAdapter({
    adapterSettings: {
        loginConfig: {
            google: {
                verifier: "web3-auth-custom",
                verifierSubIdentifier: "web3auth-google",
                typeOfLogin: "google",
                clientId: "your_google_client_id",
            },
            twitterauth0: {
                verifier: "web3-auth-custom",
                verifierSubIdentifier: "web3auth-twitter",
                typeOfLogin: "twitter",
                clientId: 'your_twitter_client_id',
            },
            email_passwordless: {
                verifier: "web3-auth-custom",
                verifierSubIdentifier: "web3auth-emailpasswordless",
                typeOfLogin: "email_passwordless",
                clientId: clientId,
            }
        },
    },
    privateKeyProvider: ethereumPrivateKeyProvider,
});

web3auth.configureAdapter(authAdapter);
await web3auth.init();

Proposed Solution:

  1. Verification of Twitter Configuration: Ensure that the Twitter integration is set up correctly, particularly the verifier and client ID. Sometimes the configuration settings can cause different accounts to be created.

  2. Consistent Verifier: Check if the verifier being used for the Twitter login method aligns with the other methods. Consistency here can help maintain a single account across different login types.

  3. Account Linking: If not already implemented, consider account linking in your backend for the same user to consolidate accounts into one.

If you can, please check the following:

  • Any error messages in the browser console that could provide insights.
  • Whether the issue persists across different networks or environments.

If you have any additional images or links that could help in diagnosing the problem, feel free to share those!

I hope this helps, and I look forward to hearing back from you!

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.

these are my sub Verifier

here I am using

const config = chainConfig[chain];
    const web3auth = await initWeb3Auth(config);
    console.log('providerName:', providerName)
    console.log('email:', email)
    if (!web3auth) {
      throw new Error('Web3Auth initialization failed. Please check the configuration.');
    }
    let web3authProvider
    if (adapterType === 'social') {
      web3authProvider = await web3auth.connectTo(WALLET_ADAPTERS.AUTH, {
        loginProvider: providerName,
    
      });
    } else if (adapterType === 'email_passwordless') {
      web3authProvider = await web3auth.connectTo(WALLET_ADAPTERS.AUTH, {
        loginProvider: providerName,
        extraLoginOptions: {
          login_hint: email?.trim(),
        },
      });
    }

my buttons

 <Button
            disabled={loading.twitter}
            isLoading={loading.twitter}
            className="w-10 rounded h-10 mt-2"
            label={t("auth:twitter_sign_up")}
            icon={<FaXTwitter />}
            onClick={() => connectData('twitterauth0', 'social')}
          />
          <Button
            disabled={loading.google}
            isLoading={loading.google}
            className="w-10 rounded h-10 mt-2 ml-3"
            label={t("auth:google_sign_up")}
            icon={<FaGoogle color="" />}
            onClick={() => connectData('google', 'social')}
          />

Hey @amityadav.immanent closing this in favour of Aggregate Providers