Answers for "passportjs serializeuser"

0

passportjs serializeuser

passport.serializeUser(function(user, done) {
  done(null, user.id);
});

passport.deserializeUser(function(id, done) {
  User.findById(id, function(err, user) {
    done(err, user);
  });
});
Posted by: Guest on June-20-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language