Is there a way to make cookies never expire for express-session? If not, what is the maximum maxAge allowed?
I came across some outdated information on setting cookie expiration on SO (over 10 years old) and here on express, which mentions a maxAge of 1 year.
Can cookies be set to never expire in express-session, and if so, how can it be achieved?
In my current configuration, the maxAge is set to null as shown below:
const options = {
// ... snip
resave: false,
saveUninitialized: true,
cookie:{
maxAge: null
},
store: new RedisStore({ client: RedisClient })
};
Also, what is the default maxAge value?
Despite the documentation stating that the default (null) should not be persistent, I noticed that they still persist for some time when left at null.