Use of resave and saveUninitialized configuration options (original) (raw)
Hi,
I have just got started with using this library and so far have configured it with some basic defaults like so:
app.use(session({ secret: 'some secret here', resave: false, saveUninitialized: false }));
I see the session cookie returned in the browser, if I then clear out my cookies in the browser and make another request in the application, I don't see a new cookie returned.
If I remove the resave
and saveUninitialized
config options, I get warnings to say these options are deprecated and to provide values. If I leave out these config options, I do see cookies regenerated on subsequent requests in the browser after clearing the cookies.
The docs suggest setting these config options to false in most cases, so I am unsure what do set these to with the behaviour I am seeing where cookies are not getting regenerated.
I'm using the default memory store too, so is this a limitation of that? (I am planning on using a different store further down the line)