|
|
@@ -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',
|