So in my app.js file I have this: app.use(session({secret: 'mySecret', resave: false, saveUninitialized: false}));
This works fine but comes up with a warning:
Cookie “connect.sid” will be soon rejected because it has the “sameSite” attribute set to “none” or an invalid value, without the “secure” attribute. To learn more about the “sameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Cookies
Then it will randomly stop working. If I change session to this: app.use(session({secret: 'mySecret', resave: false, saveUninitialized: false, sameSite: true, cookie: {secure: true}}));it becomes undefined.
I am trying to save 2 different id's: req.session.qrID and req.session.visitID;
It is used in a number of post requests. What can I do to make this work?