showing results for - "passportjs serializeuser"
Lou-Ann
05 Feb 2018
1passport.serializeUser(function(user, done) {
2  done(null, user.id);
3});
4
5passport.deserializeUser(function(id, done) {
6  User.findById(id, function(err, user) {
7    done(err, user);
8  });
9});