From cda878d3777b7cd57b70b48f9418ec5dd9c2d702 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Sat, 9 Mar 2019 14:42:06 +0100 Subject: [PATCH] Add required change for Google+ API deprecation Since Google+ is shutting down soon, we need to get the profile data from another URL. Since the library already supports it, all we need to do is adding a single line of code. Details: https://github.com/hackmdio/codimd/issues/1160 Signed-off-by: Sheogorath --- lib/web/auth/google/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/web/auth/google/index.js b/lib/web/auth/google/index.js index 60282cf..0a4fd55 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) {