nraboy / ng-cordova-oauth

AngularJS oauth library for use with Apache Cordova projects
https://www.thepolyglotdeveloper.com
MIT License
456 stars 199 forks source link

Add "offline-access" feature in google auth flow to get refresh tokens #268

Closed etipirev closed 8 years ago

etipirev commented 8 years ago

Actually plugin returns only access_token and id_token, the access_token i recieve has an expiration time of only 1h so i need to reauthenticate the user after that time to keep in sync my app's calendar with google. Probably adding 'access_type=offline' parameter to the auth url in oauth.google.js at Line 28, and adding refresh_token in resolve method at line 40, should do the trick.

If i'll have time i could make a pull request.

etipirev commented 8 years ago

Sorry, just seen a pull request on the subject, closing...