From 3ab615a33b43bf73c8d0207dccc7ca723aa56b05 Mon Sep 17 00:00:00 2001 From: Marek Dorda Date: Thu, 26 Sep 2019 12:12:04 +0200 Subject: [PATCH] Pass request object in authorizationParams --- lib/strategy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/strategy.js b/lib/strategy.js index 8ac16e4..a017c81 100644 --- a/lib/strategy.js +++ b/lib/strategy.js @@ -222,7 +222,7 @@ OAuth2Strategy.prototype.authenticate = function(req, options) { return this.error(ex); } } else { - var params = this.authorizationParams(options); + var params = this.authorizationParams(options, req); params.response_type = 'code'; if (callbackURL) { params.redirect_uri = callbackURL; } var scope = options.scope || this._scope; @@ -317,7 +317,7 @@ OAuth2Strategy.prototype.userProfile = function(accessToken, done) { * @return {Object} * @api protected */ -OAuth2Strategy.prototype.authorizationParams = function(options) { +OAuth2Strategy.prototype.authorizationParams = function(options, req) { return {}; };