|
@@ -2,8 +2,7 @@ const debug = require('debug')('growi:service:PassportService');
|
|
|
const passport = require('passport');
|
|
const passport = require('passport');
|
|
|
const LocalStrategy = require('passport-local').Strategy;
|
|
const LocalStrategy = require('passport-local').Strategy;
|
|
|
const LdapStrategy = require('passport-ldapauth');
|
|
const LdapStrategy = require('passport-ldapauth');
|
|
|
-// const GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
|
|
|
|
|
-const GoogleStrategy = require('passport-google-oauth20').Strategy;
|
|
|
|
|
|
|
+const GoogleStrategy = require('passport-google-auth').Strategy;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* the service class of Passport
|
|
* the service class of Passport
|
|
@@ -264,11 +263,11 @@ class PassportService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
debug('GoogleStrategy: setting up..');
|
|
debug('GoogleStrategy: setting up..');
|
|
|
-
|
|
|
|
|
passport.use(new GoogleStrategy({
|
|
passport.use(new GoogleStrategy({
|
|
|
- clientID: config.crowi['security:passport-google:clientId'],
|
|
|
|
|
|
|
+ clientId: config.crowi['security:passport-google:clientId'],
|
|
|
clientSecret: config.crowi['security:passport-google:clientSecret'],
|
|
clientSecret: config.crowi['security:passport-google:clientSecret'],
|
|
|
- callbackURL: '/passport/google/callback',
|
|
|
|
|
|
|
+ callbackURL: 'http://localhost:3000/passport/google/callback',
|
|
|
|
|
+ skipUserProfile: false,
|
|
|
}, function(accessToken, refreshToken, profile, done) {
|
|
}, function(accessToken, refreshToken, profile, done) {
|
|
|
if (profile) {
|
|
if (profile) {
|
|
|
return done(null, profile);
|
|
return done(null, profile);
|