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: https://github.com/orgs/Web3Auth/discussions/1163
Can somebody help me out with getting a refresh token issued along with an access token in Web3 auth ?
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 ?
Hey @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.
AccessToken returned here are from OAuth Login Providers. But we do return an idToken.
May I know what the use case you have is?