react-social-login icon indicating copy to clipboard operation
react-social-login copied to clipboard

Refresh Access Token

Open ErAz7 opened this issue 3 years ago • 3 comments

Hi Why onLoginSuccess doesn't return refresh_token from google OAuth? (and also other providers) without this refresh token, it will be unusable @deepakaggarwal7 @nicolas-goudry

ErAz7 avatar Apr 22 '21 15:04 ErAz7

Can you check this behaviour once on the demo site. I could get the access token upon signing in with google.

deepakaggarwal7 avatar Jun 19 '21 14:06 deepakaggarwal7

@deepakaggarwal7 @nicolas-goudry I can see access token in the demo site, but not refresh token. Is there anyway to get the refresh_token ?

harristblr avatar Mar 20 '22 07:03 harristblr

In my opinion, JS Client library doesn't return a refresh token. Every login it refreshes itself if there's a valid refresh token and if that has expired, it redirects to Google login automatically. Are you looking for a specific provider? Similarly FB also doesn't provide refresh token. It's long lived token is valid for 60 days and if login happens in middle, it refreshes (else user is redirected to login screen). Could you please share the scenario in which the library will be unusable?

On Sun, Mar 20, 2022 at 1:19 PM harristblr @.***> wrote:

@deepakaggarwal7 https://github.com/deepakaggarwal7 @nicolas-goudry https://github.com/nicolas-goudry I can see access token in the demo site, but not refresh token. Is there anyway to get the refresh_token ?

— Reply to this email directly, view it on GitHub https://github.com/deepakaggarwal7/react-social-login/issues/200#issuecomment-1073190761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEU7A3CLYKWBMRT2Q35OQ43VA3J7PANCNFSM43MW4U4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

deepakaggarwal7 avatar Mar 21 '22 14:03 deepakaggarwal7