How do I get a refresh token from web3 auth?

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

Originally posted by: dheesimha

Check the discussion at:

Hey @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

Hey @dheesimha

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

  "email": "",
  "name": "John Dash",
  "profileImage": "",
  "aggregateVerifier": "tkey-google-lrc",
  "verifier": "torus",
  "verifierId": "",
  "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

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