R
R
rizzli2017-01-24 16:10:50
JavaScript
rizzli, 2017-01-24 16:10:50

PassportJS and Express-Session, how to add extra data to session?

How to correctly add additional objects to the session (req.session)?
I stupidly add req.session.x = 1 on the forehead, in principle everything was fine. But when the session is saved by passport, it writes only the cookie and passport, and everything else is cleared. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question