Hey there. I need to get the refresh_token which will be sent to my backend. But actually i am not sure if the accessToken i am receiving from this module is the same as the refreshToken i need mentioned at google sign in docs: https://developers.google.com/identity/protocols/OAuth2WebServer#handlingresponse
Hello @BigPun86
to clarify accessToken is for when you need to access Google API on behalf of the user, from the application. example: fetch user calendar events and display them in your app
serverAuthToken is what you send to your backend server. From there you can exchange the serverAuthToken for an accessToken and access user data from your backend server. example: you periodically fetch user calendar events and sync with your DB
hope it helps
Okay thanks, sounds good. But i have one problem, my server needs the refresh_token which start something like 1/..... my serverAuthCode and my accessToken are not the right tokens for my server. Is there a way to access refresh_token from this module?
out of curiosity what is the use case to push a refresh token to your server ?
Okay i see. The thing why i wanted to do this, is that i wanted to do the authorization over my backend. But thanks a lot for the explanation :P So i just send serverAuthToken and it should be fine....
Most helpful comment
Hello @BigPun86
to clarify
accessTokenis for when you need to access Google API on behalf of the user, from the application. example: fetch user calendar events and display them in your appserverAuthTokenis what you send to your backend server. From there you can exchange theserverAuthTokenfor anaccessTokenand access user data from your backend server. example: you periodically fetch user calendar events and sync with your DBhope it helps