# \[Archive\] Having the wallet address a part of the idtoken

**URL:** <https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [February 9, 2023, 8:04pm UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921 "2023-02-09T20:04:56Z")\
**Posts on this page:** 8\
**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:** [February 9, 2023, 8:04pm UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/1 "2023-02-09T20:04:56Z")

</div>

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

* * *

I'm not sure if that's possible but it would be very useful to have the wallet address be a part of the id token and JWT.

Our use case is a complex onboarding process and it'll be helpful to use the verified JWT for authentication, and base it on wallet address rather than an email.

  
   
 Originally posted by: [shayg-grappa](https://github.com/shayg-grappa)  
   
 Check the discussion at: [https://github.com/orgs/Web3Auth/discussions/1306](https://github.com/orgs/Web3Auth/discussions/1306)

---

<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:** [February 10, 2023, 2:54am UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/2 "2023-02-10T02:54:24Z")

</div>

Hey there,

We currently provide the public key which can be used to derive an addresses for the chain which you're on

[https://betterprogramming.pub/understanding-ethereum-cryptography-3ef7429eddce](https://betterprogramming.pub/understanding-ethereum-cryptography-3ef7429eddce) this might be helpful here

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

---

<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:** [February 16, 2023, 1:27pm UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/3 "2023-02-16T13:27:49Z")

</div>

10x for your help, we did manage to extract the address from the public key

  
   
 Originally posted by: [shayg-grappa](https://github.com/shayg-grappa)

---

<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:** [February 10, 2023, 12:17pm UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/4 "2023-02-10T12:17:19Z")

</div>

you could decode the idToken and get the wallet-\> public\_key  
[https://web3auth.io/docs/server-side-verification/social-login-users#sample-idtoken-payload](https://web3auth.io/docs/server-side-verification/social-login-users#sample-idtoken-payload)

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

---

<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:** [February 27, 2023, 7:10am UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/5 "2023-02-27T07:10:42Z")

</div>

This would be great to document in the server side verification, took a while to find. I guess changing the curve will let obtain other chains' public addresses (such as Solana) in this case.

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

---

<div class="post-metadata">

**Author:** ![vojta](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@vojta](https://builder.metamask.io/u/vojta)\
**Post date:** [March 16, 2023, 8:07am UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/6 "2023-03-16T08:07:43Z")

</div>

Please note that the public key is compressed. It took me few hours to study the keccak and eliptical curvers and how it is even possible to do the compression. Afterwards I noticed that the resulting address had different case than the one I generated, so I have had to learn about the “checksum” address.

So it was a great learning episode about the Ethereum essentials in the end… but for those who just need a solution, here is the code I ended up with:

```python
import eth_utils
from coincurve import PublicKey

```

---

<div class="post-metadata">

**Author:** ![tahmidislam1998](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tahmidislam1998](https://builder.metamask.io/u/tahmidislam1998)\
**Post date:** [June 25, 2023, 5:23am UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/7 "2023-06-25T05:23:54Z")

</div>

I got an in correct address.

---

<div class="post-metadata">

**Author:** ![tahmidislam1998](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tahmidislam1998](https://builder.metamask.io/u/tahmidislam1998)\
**Post date:** [June 25, 2023, 10:52am UTC](https://builder.metamask.io/t/archive-having-the-wallet-address-a-part-of-the-idtoken/1921/8 "2023-06-25T10:52:01Z")

</div>

by public key you mean -  
iss: ‘[https://api.openlogin.com](https://api.openlogin.com)’,

```auto
  wallets: [
    {
      public_key: '02e44fbf4fc567cccdac53dc73ac7660312c1dd3a9205017089ea56276a643d7d4',
      type: 'web3auth_app_key',
      curve: 'secp256k1'
    }
  ],

```
