Skip to content

Instantly share code, notes, and snippets.

View sagar2agrawal's full-sized avatar
💭
Let's do it.

Sagar Agrawal sagar2agrawal

💭
Let's do it.
  • Bangalore, India
View GitHub Profile
@sagar2agrawal
sagar2agrawal / passport.js
Last active December 19, 2017 12:52
Accessing session data in passport js
var LocalStrategy = require('passport-local').Strategy;
var FacebookStrategy = require('passport-facebook').Strategy;
var User = require('../models/User.js');
var configAuth = require('./auth.js');
module.exports = function(passport) {
passport.serializeUser(function(user, done) {
done(null, user.id);
});