# \[Archive\] Want to switch to another chain after login

**URL:** <https://builder.metamask.io/t/archive-want-to-switch-to-another-chain-after-login/2223>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [December 12, 2022, 6:51pm UTC](https://builder.metamask.io/t/archive-want-to-switch-to-another-chain-after-login/2223 "2022-12-12T18:51:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![githubdiscussions](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@githubdiscussions](https://builder.metamask.io/u/githubdiscussions)\
**Post date:** [December 12, 2022, 6:51pm UTC](https://builder.metamask.io/t/archive-want-to-switch-to-another-chain-after-login/2223/1 "2022-12-12T18:51:37Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **githubdiscussions** on 12/12/2022.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

After I log-in on ethereum, I want to switch to another chain (e.g. AVAX) while logged-in.

In other words,

- configure metamask adapter with ethereum
- log in using metamask adapter on ethereum
- now, I want to request chain switch on metamask

  
   
 Originally posted by: [softcheetah](https://github.com/softcheetah)  
   
 Check the discussion at: [https://github.com/orgs/Web3Auth/discussions/1057](https://github.com/orgs/Web3Auth/discussions/1057)

---

<div class="post-metadata">

**Author:** ![githubdiscussions](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@githubdiscussions](https://builder.metamask.io/u/githubdiscussions)\
**Post date:** [January 5, 2023, 3:29am UTC](https://builder.metamask.io/t/archive-want-to-switch-to-another-chain-after-login/2223/2 "2023-01-05T03:29:50Z")

</div>

You could refer this example code  
[https://github.com/Web3Auth/web3auth-wagmi-connector/blob/master/src/lib/connector.ts#L237](https://github.com/Web3Auth/web3auth-wagmi-connector/blob/master/src/lib/connector.ts#L237)

```
      await this.provider.request({
        method: "wallet_switchEthereumChain",
        params: [
          {
            chainId: `0x${chain.id.toString(16)}`,
          },
        ],
      });

```

  
   
 Originally posted by: [ieow](https://github.com/ieow)
