getstation / electron-google-oauth2

A Google OAuth2 module for your Electron app
MIT License
79 stars 38 forks source link

Ability to generateAuthUrl with propmt param #12

Closed vovasit91 closed 9 months ago

vovasit91 commented 4 years ago

If you miss to save refresh token in your app or if your refresh token got deleted from your app it would be good to have ability to generate Authorization url with extra option prompt: consent

In code it would look like this let url = this.oauth2Client.generateAuthUrl({ access_type: 'offline', scope: this.scopes, prompt: 'consent', redirect_uri:http://127.0.0.1:${this.options.loopbackInterfaceRedirectionPort}/callback }); because without this param next authorization will generate all tokens except refresh_token.

hijklmno commented 3 years ago

I've made a relevant PR in #23