// used to serialize the user for the session
passport.serializeUser(function(user, done) {
console.log("serializuser called " ,user);
done(null, user.username);
});
// used to deserialize the user
passport.deserializeUser(function(user, done) {
console.log("de serializuser called ",user);
done(null, user);
});
为什么护照在序列化功能中使用 user.username 时不会创建会话但是当我使用用户对象
时会话正常