# \[Archive\] Key mismatch after updating to web3auth no-modal

**URL:** <https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [May 6, 2024, 10:18am UTC](https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333 "2024-05-06T10:18:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![13.eremeev.sv](https://avatars.discourse-cdn.com/v4/letter/1/f17d59/32.png) [@13.eremeev.sv](https://builder.metamask.io/u/13.eremeev.sv)\
**Post date:** [May 6, 2024, 10:18am UTC](https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333/1 "2024-05-06T10:18:59Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **13.eremeev.sv** on 5/6/2024.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

When asking for help in this category, please make sure to provide the following details:

- SDK Version: 7.3.2
- Platform: Web
- Browser Console Screenshots:
- If the issue is related to Custom Authentication, please include the following information (optional):
  - Verifier Name:
  - JWKS Endpoint:
  - Sample idToken (JWT):

Hi, we have been using the old version of web3auth (prior to the release of the modal/no-modal sdks) and some of our users were created by simply authenticating on our website with email/password and then we used this email with the openlogin -email passwordless adapter to create a wallet for them. This project has been inactive for a couple of months and now we have revived it. We have made all the necessary changes, updated the implementations for walletconnect and metamask, updated packages to the no-modal sdk, and almost everything works, with exception of old users being unable to get the same private key from authentication through the openlogin via the no-modal sdks.

Before I share any relevant code, can you please let me know if the new no-modal sdk should be creating the same private key from such authentication (openlogin - email passwordless) as the old packages did?

Thanks in advance for your response!

---

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://builder.metamask.io/u/TomTom)\
**Post date:** [May 6, 2024, 5:57pm UTC](https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333/2 "2024-05-06T17:57:53Z")

</div>

hi @13.eremeev.sv

I hope you are doing great.

Please find attached the documentation about when you could get different private keys: [https://web3auth.io/docs/troubleshooting/different-private-key](https://web3auth.io/docs/troubleshooting/different-private-key)

If you are using the same web3auth network, client id, verifier and SDK. You should be getting the same address.

please contact me if you have any doubts about this.

---

<div class="post-metadata">

**Author:** ![13.eremeev.sv](https://avatars.discourse-cdn.com/v4/letter/1/f17d59/32.png) [@13.eremeev.sv](https://builder.metamask.io/u/13.eremeev.sv)\
**Post date:** [May 17, 2024, 6:55am UTC](https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333/3 "2024-05-17T06:55:36Z")

</div>

Thanks a lot for your reply Tom!

Here’s the old code we were using:

```auto
const openLoginAdapter = new OpenloginAdapter({
          adapterSettings: {
            network:
              process.env.NEXT_PUBLIC_ERC1155_NETWORK === "polygon-mainnet"
                ? "mainnet"
                : "testnet",
            clientId,
            uxMode: "popup",
          },
          loginSettings: {
            getWalletKey: true,
          },
          chainConfig: {
		chainNamespace: CHAIN_NAMESPACES.EIP155,
		chainId: getChainId(),
		rpcTarget: `https://${
			isPolygonMainnet ? "polygon-mainnet" : "polygon-mumbai"
		}.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_APP_ID}`,
		displayName: process.env.NEXT_PUBLIC_ERC1155_NETWORK!,
		blockExplorer: `https://${isMumbai ? "mumbai." : ""}polygonscan.com/`,
		ticker: "MATIC",
		tickerName: "Polygon",
	},
        });
        web3auth.configureAdapter(openLoginAdapter);

```

That was with the @web3auth/web3auth and @web3auth/base packages.

This year we changed the code to this:

```auto
const web3auth = new Web3AuthNoModal({
          clientId,
          chainConfig: {
    adapterNamespace: CHAIN_NAMESPACES.EIP155,
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: getChainId(),
    rpcTarget: `https://rpc.ankr.com/polygon/14e67e706759f10b38bab34e699878f3095157a6682b62dfd10ea910b2999570`,
    displayName: process.env.NEXT_PUBLIC_ERC1155_NETWORK!,
    blockExplorer: `https://${isMumbai ? "mumbai." : ""}polygon.etherscan.io`,
    ticker: "MATIC",
    tickerName: "Polygon",
  },
          web3AuthNetwork: "cyan",
        });
    const privateKeyProvider = new EthereumPrivateKeyProvider({
      config: { chainConfig: {
adapterNamespace: CHAIN_NAMESPACES.EIP155,
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: getChainId(),
rpcTarget: `https://rpc.ankr.com/polygon/14e67e706759f10b38bab34e699878f3095157a6682b62dfd10ea910b2999570`,
displayName: process.env.NEXT_PUBLIC_ERC1155_NETWORK!,
blockExplorer: `https://${isMumbai ? "mumbai." : ""}polygon.etherscan.io`,
ticker: "MATIC",
tickerName: "Polygon",

} },
});
    const openloginAdapter = new OpenloginAdapter({
      privateKeyProvider,
    });
    web3auth.configureAdapter(openloginAdapter);

```

I see there are some minor differences in the configuration, but not sure which ones exactly can mess up the resulting private keys our users are getting when they log in. Can you please let us know which parts of the config we need to change to fix the issue.

Thanks a lot in advance!

---

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://builder.metamask.io/u/TomTom)\
**Post date:** [May 17, 2024, 9:58am UTC](https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333/4 "2024-05-17T09:58:34Z")

</div>

hi @13.eremeev.sv

Do you remember which network you were using? I see you are using “cyan” now, but Is it the same as the one you were using?

Also please notice that @web3auth/web3auth has been deprecated and Mumbai is not working anymore. You should use Amoy Polygon testnet.

---

<div class="post-metadata">

**Author:** ![13.eremeev.sv](https://avatars.discourse-cdn.com/v4/letter/1/f17d59/32.png) [@13.eremeev.sv](https://builder.metamask.io/u/13.eremeev.sv)\
**Post date:** [May 23, 2024, 7:03am UTC](https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333/5 "2024-05-23T07:03:26Z")

</div>

We are using the same project in the web3auth dashboard and under the project environment it says “Legacy cyan mainnet (USA) (Cyan)”, so we’ve put “cyan” in the config object. I have a feeling our config object had “mainnet” for the environment before, but I might be wrong.

---

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://builder.metamask.io/u/TomTom)\
**Post date:** [June 10, 2024, 6:16pm UTC](https://builder.metamask.io/t/archive-key-mismatch-after-updating-to-web3auth-no-modal/1333/6 "2024-06-10T18:16:22Z")

</div>

hi @13.eremeev.sv

if your dashboard says Cyan is because you were using it 🙂
