-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change the maxage of a session for a specific user? #15
Comments
Duplicate #5 |
Nevermind that doesn't solve issue about changing it for specific cookies. |
Hi! Sorry this module has been sitting around for so long! I have added how you can do this with |
Eh, nevermind. That doesn't work right. This module needs a serious overhaul :) |
For now, with version 1.2.0, the solution would be as follows if you want a sticky maxAge: app.use(cookieSession())
app.use(function (req, res, next) {
req.sessionOptions.maxAge = req.session.maxAge || req.sessionOptions.maxAge
}) |
In express3.x this was possible using
req.session.cookie.maxAge
.However it seems that req.session.cookie is undefined. So is it possible to change the properties of the cookie without changing them globally?
The text was updated successfully, but these errors were encountered: