I’m doing it like this:
app.use(express.session({
cookie:{domain:"."+settings.c.SITE_DOMAIN},
secret:'abc',
store: redis_store,
}));
When I log into my redis and type TTL sess:..., it seems that there is an expiration on this session.
How can I make the sessions never expire? (for everything). I also want the cookies to never expire.
As mentioned in the Connect guide on the session middleware page (Express uses Connect internally), you can specify a maxAge option on sessions:
Example:
Note: maxAge is in milliseconds, so for example a day = 86400000