From 6332fce5d886e637acb8756d31a38ace2c1f3daa Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 20 Feb 2020 22:43:07 -0500 Subject: [PATCH] Add OIDC scopes for email & profile retrieval Signed-off-by: Marius --- lib/config/default.js | 3 ++- lib/web/auth/oauth2/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/config/default.js b/lib/config/default.js index 7504fda28..0b3031b14 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -91,7 +91,8 @@ module.exports = { authorizationURL: undefined, tokenURL: undefined, clientID: undefined, - clientSecret: undefined + clientSecret: undefined, + scope: 'openid email profile' }, facebook: { clientID: undefined, diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js index 2bd731961..1865ad54c 100644 --- a/lib/web/auth/oauth2/index.js +++ b/lib/web/auth/oauth2/index.js @@ -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) {