diff options
Diffstat (limited to 'lib/web/auth')
-rw-r--r-- | lib/web/auth/google/index.js | 3 | ||||
-rw-r--r-- | lib/web/auth/oauth2/index.js | 4 | ||||
-rw-r--r-- | lib/web/auth/openid/index.js | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/web/auth/google/index.js b/lib/web/auth/google/index.js index 60282cf5..0a4fd55e 100644 --- a/lib/web/auth/google/index.js +++ b/lib/web/auth/google/index.js @@ -11,7 +11,8 @@ let googleAuth = module.exports = Router() passport.use(new GoogleStrategy({ clientID: config.google.clientID, clientSecret: config.google.clientSecret, - callbackURL: config.serverURL + '/auth/google/callback' + callbackURL: config.serverURL + '/auth/google/callback', + userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo" }, passportGeneralCallback)) googleAuth.get('/auth/google', function (req, res, next) { diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js index b9160f6e..57ab9b9a 100644 --- a/lib/web/auth/oauth2/index.js +++ b/lib/web/auth/oauth2/index.js @@ -100,7 +100,7 @@ oauth2Auth.get('/auth/oauth2', function (req, res, next) { // github auth callback oauth2Auth.get('/auth/oauth2/callback', passport.authenticate('oauth2', { - successReturnToOrRedirect: config.serverurl + '/', - failureRedirect: config.serverurl + '/' + successReturnToOrRedirect: config.serverURL + '/', + failureRedirect: config.serverURL + '/' }) ) diff --git a/lib/web/auth/openid/index.js b/lib/web/auth/openid/index.js index 96f61807..c45c6d71 100644 --- a/lib/web/auth/openid/index.js +++ b/lib/web/auth/openid/index.js @@ -55,7 +55,7 @@ openIDAuth.post('/auth/openid', urlencodedParser, function (req, res, next) { // openID auth callback openIDAuth.get('/auth/openid/callback', passport.authenticate('openid', { - successReturnToOrRedirect: config.serverurl + '/', - failureRedirect: config.serverurl + '/' + successReturnToOrRedirect: config.serverURL + '/', + failureRedirect: config.serverURL + '/' }) ) |