I need to add some session data express router (using express-session and passport).
I store the data correctly into user record in DB (mongo) and try to set the value to session data:
req.user.myData = "my session data";
Unfortunately the user data are serialized only during user authorization via passport. So "myData" are not stored into current session. When new user session is started, data are loaded from DB correctly and are available.
Is there any way (I expect so) to make data available in current session?
via dalicrosKH
No comments:
Post a Comment