Add OIDC scopes for email & profile retrieval

Signed-off-by: Marius <elespike@lab26.net>
This commit is contained in:
Marius 2020-02-20 22:43:07 -05:00 committed by elespike
parent 8ce7b28563
commit 6332fce5d8
2 changed files with 4 additions and 2 deletions

View file

@ -91,7 +91,8 @@ module.exports = {
authorizationURL: undefined,
tokenURL: undefined,
clientID: undefined,
clientSecret: undefined
clientSecret: undefined,
scope: 'openid email profile'
},
facebook: {
clientID: undefined,

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) {