var passport = require('passport'); var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy; passport.use(new GoogleStrategy({ clientID: "633754977454-7dcfrsfob7sjq5lim47tc63pdjch6imr.apps.googleusercontent.com", clientSecret: "D7lHcUgZbCpmWZtooRlICzAH", callbackURL: "https://localhost:3000/auth/google/callback" }, function(accessToken, refreshToken, profile, done) { User.findOrCreate({ userid: profile.id }, { name: profile.displayName,userid: profile.id }, function (err, user) { return done(err, user); }); } )); module.exports = passport;