File tree 1 file changed +3
-1
lines changed 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ function OAuth2Strategy(options, verify) {
94
94
this . _callbackURL = options . callbackURL ;
95
95
this . _scope = options . scope ;
96
96
this . _scopeSeparator = options . scopeSeparator || ' ' ;
97
+ this . _responseType = options . responseType || 'code' ;
97
98
this . _key = options . sessionKey || ( 'oauth2:' + url . parse ( options . authorizationURL ) . hostname ) ;
98
99
99
100
if ( options . store ) {
@@ -133,6 +134,7 @@ OAuth2Strategy.prototype.authenticate = function(req, options) {
133
134
}
134
135
135
136
var callbackURL = options . callbackURL || this . _callbackURL ;
137
+ var responseType = options . responseType || this . _responseType ;
136
138
if ( callbackURL ) {
137
139
var parsed = url . parse ( callbackURL ) ;
138
140
if ( ! parsed . protocol ) {
@@ -214,7 +216,7 @@ OAuth2Strategy.prototype.authenticate = function(req, options) {
214
216
}
215
217
} else {
216
218
var params = this . authorizationParams ( options ) ;
217
- params . response_type = 'code' ;
219
+ params . response_type = responseType ;
218
220
if ( callbackURL ) { params . redirect_uri = callbackURL ; }
219
221
var scope = options . scope || this . _scope ;
220
222
if ( scope ) {
You can’t perform that action at this time.
0 commit comments