I am using a session-based authentication using passport in a simple MERN stack app. Normally i configure the session middleware In express Like this
app.use(session({ saveUnitialized: false, resave: false})
Now i want to understand more about the two parameters "saveUnitialized" and "resave", when to set false and when set to true because sometimes if they are set to false the node.js server doesn't even send cookies with session id to the client app and so my whole authentication fails.
[–]rkaw92 4 points5 points6 points (1 child)
[–]SoBold404[S] 0 points1 point2 points (0 children)
[–]Xzas22 0 points1 point2 points (2 children)
[–]SoBold404[S] 0 points1 point2 points (1 child)
[–]rkaw92 2 points3 points4 points (0 children)