abacritt / angularx-social-login

Social login and authentication module for Angular 17
630 stars 388 forks source link

Google Authentication: Offline Access Type (allow retrieving refresh tokens) #702

Open Elashi opened 1 year ago

Elashi commented 1 year ago

In Google authentication, I noticed that you do not provide "offline access type" functionality. Also, I noticed that at some point, the library allowed and provided offline access tokens, but for some reason, the functionality was removed (From reading the project's code history, I believe this functionality was removed unintentionally).

Heatmanofurioso commented 1 year ago

@Elashi Can you indicate on which or commit that support was removed, please?

Elashi commented 1 year ago

In this commit and before 6aebc469fc69b0a1166c4ed148195d12a9f0ddc7 The code used to pass offline option to access_type, which forces Google APIs to return a refresh token along with the access token. This refresh token can be passed to the server to allow the server to refresh the token when needed instead of having to count on the front end to refresh the token. I did not check whether the code used to return the refresh token back to the user or not, but the options are passed correctly.

Heatmanofurioso commented 1 year ago

We can add that back as an optional parameter perhaps. What are your thoughts on doing so? @Elashi

brianl168 commented 1 year ago

is there any news about this? i need these offline token too

ted-mundy commented 11 months ago

any update on this?

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.