Reputation: 1682
I'm developing one application that i need a infinit session for some login. But my session was expire. I'm using Redis for control sessions and i'm authenticate Users with Json Web Token. Apparently, my Cookies settings is wrong.
Upvotes: 1
Views: 242
Reputation: 196
Open config/session.js
Uncomment the following lines:
cookie: {
maxAge: 24 * 60 * 60 * 1000
},
Replace maxAge value with some that will point in distant future, like 10 years from now:
maxAge: 10 * 365 * 24 * 60 * 60 * 1000
Upvotes: 1