I am setting the session in my express app with express-session
const session = require("express-session");
const sessionConfig = {
secret: "secret",
resave: false,
saveUninitialized: true,
cookie: {
httpOnly: true,
expires: Date.now() + 100 * 60 * 60 * 24 * 7,
maxAge: 100 * 60 * 60 * 24 * 7,
},
};
app.use(session(sessionConfig));
And in my browser I can't see any 'connect.sid' cookie.
---
express version:
"express": "^4.17.1"
express-session version:
"express-session": "^1.17.2"
node version:
v14.17.6
Solution #2
try using node v12.16.1
note-1: Node.js 12 will remain in support until April 2022
note-2: The current LTS is v16.13.0
Solution #1 (didn't work)
Try using last version of express:
"express": "^4.17.1"