Closed jetsonjohn closed 11 years ago
That is handled via Connect's session middleware, so for example:
.use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }}))
The documentation has other useful bits that are worth reading for understanding session handling.
app.use(function (req, res, next) {
req.sessionOptions.maxAge = 24 * 60 * 60 * 1000 // 24 hours,
next()
})
Refer to #Per-user sticky max age https://github.com/expressjs/cookie-session
I want to set a session timeout after log in using passportjs. How to set the maxAge for the session using passportjs. What is the default max age for the session that passportjs provide?