存入session不太理解这样的写法!
为啥是req.session.user = user; 第一个user是什么意思?
为啥是req.session.user = user; 第一个user是什么意思?
2016-05-01
查看mongo就知道
{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},
"user":{"_id":"5742d3d0bf426b441d5a9efc","name":"admin","key":"$2a$10$Ov5hVYc1fSNkaYh0huakkeh9.RjmwnTAlJ49hur74rBoN01RKWfNq","__v":0,"meta":{"loginedIp":"","loginedAt":"2016-05-23T09:56:32.754Z","createdAt":"2016-05-23T09:55:38.170Z"},"roles":[0],"email":"","phone":null,"organization":""}}
user就是存放到mongo的session的key
举报