Same tokens (idToken and oAuthTokens) returned for every user

Hello,

Every user that authenticates with google is returning the same idToken, oAuthIdToken and oAuthAccessToken. we are using next-auth as well

Please provide the following details too when asking for help in this category:

  • SDK Version:
  • Platform: Desktop/nodejs
  • Browser Console Screenshots:
  • Related to Custom Authentication? Please provide the following info too: (Optional)

Please provide the Web3Auth initialization and login code snippet below:

      const web3auth = new Web3AuthConfig({
        clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID || "",
        chainConfig: {
          chainNamespace: CHAIN_NAMESPACES.EIP155,
          chainId: "0x1", // Use 0x5 for Goerli Testnet
          rpcTarget: "https://mainnet.infura.io/v3/" + infuraId,
        },
        web3AuthNetwork,
        authMode: "WALLET",
        uiConfig: {
          loginMethodsOrder: ["google"],
        },
      });

      const openloginAdapter = new OpenloginAdapter({
        adapterSettings: {
          uxMode: "popup",
          loginConfig: {
            google: {
              name: "Google",
              verifier: "google-inflorencers",
              typeOfLogin: "google",
              clientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
            },
          },
        },
      });

      web3auth.configureAdapter(openloginAdapter);

Hey @nomad

Thanks for your question. Can I know the following details?

Which Web3Auth SDK and version are you using?
Can I see two sample JWTs of different accounts to compare the things you’re mentioning?
Also which network are you on? I cannot see the network defined in the SDK parameters, please define it within the Web3Auth Constructor

Thanks for the fast reply! here is the requested info:

web3auth sdk versions:

    "@web3auth/ethereum-provider": "^5.0.1",
    "@web3auth/modal": "^5.0.1",
    "@web3auth/node-sdk": "^1.0.1",

for the network, we have tried ‘testnet’ and ‘cyan’

The idToken returned for every user is this, regardless of machine, or google account used to authenticate:

eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlRZT2dnXy01RU9FYmxhWS1WVlJZcVZhREFncHRuZktWNDUzNU1aUEMwdzAifQ.eyJpYXQiOjE2Nzg5OTQxNjQsImF1ZCI6IkJMUnZ3VkdxSkRLOVdMWW5HM0lucmRMSnJxbGprdU9qRVFnOU1lTzNrR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