express-session
is refusing to save the session data for my users.
It is saving the session cookie, but the data is not persisting.
Here is my server.js.
It seems you are setting the following (line #31):
req.session.user = user;
But inside the base '/' route (line #21) you are checking for :
req.session.userName
Which doesn't exist, so the if statement will fail. To double check, you can always log the req.session to console to check what data is getting stored.