From 7c4f51d363ede5221f3dab58c8df811651acaec4 Mon Sep 17 00:00:00 2001 From: SyedSulaimanM Date: Sat, 18 Jun 2016 19:30:19 +0530 Subject: [PATCH 1/2] Fix: Access Type included in Google Redirect URL to get refresh token in response --- lib/strategy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/strategy.js b/lib/strategy.js index 01d78b1..29864e4 100644 --- a/lib/strategy.js +++ b/lib/strategy.js @@ -215,6 +215,7 @@ OAuth2Strategy.prototype.authenticate = function(req, options) { } else { var params = this.authorizationParams(options); params.response_type = 'code'; + params.access_type = 'offline'; if (callbackURL) { params.redirect_uri = callbackURL; } var scope = options.scope || this._scope; if (scope) { From 3dfdb4f7433739d29061887dda4f6bf32e128b63 Mon Sep 17 00:00:00 2001 From: SyedSulaimanM Date: Wed, 13 Jul 2016 13:39:50 +0530 Subject: [PATCH 2/2] Prompt by default added as 'consent' --- lib/strategy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/strategy.js b/lib/strategy.js index 29864e4..624ab11 100644 --- a/lib/strategy.js +++ b/lib/strategy.js @@ -216,6 +216,7 @@ OAuth2Strategy.prototype.authenticate = function(req, options) { var params = this.authorizationParams(options); params.response_type = 'code'; params.access_type = 'offline'; + params.prompt = 'consent'; if (callbackURL) { params.redirect_uri = callbackURL; } var scope = options.scope || this._scope; if (scope) {