# \[Archive\] How do I get a refresh token from web3 auth?

**URL:** <https://builder.metamask.io/t/archive-how-do-i-get-a-refresh-token-from-web3-auth/2222>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [January 5, 2023, 4:53am UTC](https://builder.metamask.io/t/archive-how-do-i-get-a-refresh-token-from-web3-auth/2222 "2023-01-05T04:53:32Z")\
**Posts on this page:** 3\
**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:** [January 5, 2023, 4:53am UTC](https://builder.metamask.io/t/archive-how-do-i-get-a-refresh-token-from-web3-auth/2222/1 "2023-01-05T04:53:32Z")

</div>

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

* * *

Can somebody help me out with getting a refresh token issued along with an access token in Web3 auth ?

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

---

<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, 7:44am UTC](https://builder.metamask.io/t/archive-how-do-i-get-a-refresh-token-from-web3-auth/2222/2 "2023-01-05T07:44:23Z")

</div>

Hey [@shahbaz17](https://github.com/shahbaz17) .Thanks for responding. I am building an application where user authenticate using web3auth and say I sign in from Google ,the access token is valid for another 24 hrs ,post which a user has to login again.Instead if a refresh token was generated, I could generate another access token and keep the user logged in. Does web3auth return refresh token by any chance when signed up with an OAuth provider ?

Or what is the walkaround for this to keep the user logged in to our site in case the token expires ?

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

---

<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, 7:06am UTC](https://builder.metamask.io/t/archive-how-do-i-get-a-refresh-token-from-web3-auth/2222/3 "2023-01-05T07:06:04Z")

</div>

Hey [@dheesimha](https://github.com/dheesimha)

Web3Auth returns the following in response to the `getUserInfo()` function:

```
{"email":"john@gmail.com","name":"John Dash","profileImage":"https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...","aggregateVerifier":"tkey-google-lrc","verifier":"torus","verifierId":"john@gmail.com","typeOfLogin":"google","dappShare":"\<24 words seed phrase\>","idToken":"\<jwtToken issued by Web3Auth\>","oAuthIdToken":"\<jwtToken issued by OAuth Provider\>","oAuthAccessToken":"\<accessToken issued by OAuth Provider\>"}
```

Also, check out [https://web3auth.io/docs/sdk/web/modal/usage#get-users-information](https://web3auth.io/docs/sdk/web/modal/usage#get-users-information).

AccessToken returned here are from OAuth Login Providers. But we do return an idToken.

May I know what the use case you have is?

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