Backport of #278 for 1.6.1

This is a backport of #278 with the default value of `scope` changed to
`undefined`. This is thus a fully backward-compatible change.

Signed-off-by: Victor Berger <victor.berger@m4x.org>
This commit is contained in:
Victor Berger 2020-06-20 16:33:57 +02:00
parent 0ef5261e61
commit 5f3a1b6266
5 changed files with 10 additions and 5 deletions

View file

@ -89,7 +89,8 @@ passport.use(new OAuth2CustomStrategy({
clientID: config.oauth2.clientID,
clientSecret: config.oauth2.clientSecret,
callbackURL: config.serverURL + '/auth/oauth2/callback',
userProfileURL: config.oauth2.userProfileURL
userProfileURL: config.oauth2.userProfileURL,
scope: config.oauth2.scope
}, passportGeneralCallback))
oauth2Auth.get('/auth/oauth2', function (req, res, next) {