sou 7 лет назад
Родитель
Сommit
a5070b7b4b
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      lib/routes/login-passport.js

+ 3 - 1
lib/routes/login-passport.js

@@ -246,11 +246,13 @@ module.exports = function(crowi, app) {
     }
 
     passport.authenticate('google', {
-      scope: ['profile']
+      access_type: 'offline',
+      scope: ['profile', 'email'],
     })(req, res);
   };
 
   const loginPassportGoogleCallback = function(req, res, next) {
+    // enable google+ api and then this works
     passport.authenticate('google', {failureRedirect: '/login'}, (request, response) => {
       ExternalAccount.findOrRegister(
         'google',