-
Notifications
You must be signed in to change notification settings - Fork 109
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
the exipration property seems doesn't work #89
Comments
I think the reason you aren't seeing any sessions deleted is that you didn't change the |
thanks chill, for the great work. |
Not working even for me. |
Can you provide some simplified working example that shows the unexpected behavior and then explain what you expect to happen? Whenever a request is made to the server, by a client with a session, their session is "touched" by the session middleware. This updates its expire time. The result is that if the client makes a request before their session has expired, it will continue to remain active beyond its original expire time. |
Assume that we set both req.session.username = 'somebody'; then another request is received from the same client at time t2 which is beyond the expiration, that is to say t2 - t1 > 5000 millisecond, at this moment i expect the if(req.session.username) { //unexpected
res.send( 'session is valid ');
}
else { //expected
res.send( 'session expired ' );
} |
Thank you for the clarification, @Roen-Ro The issue has been fixed and included in the latest release (v2.1.0). |
Great! thanks @chill117 |
in my code, i set the expiration property to 5000 milliseconds, expect the session to be expired after 5 seconds.
in my request handle file, beside for the 1st time, i found the session never expires.
The text was updated successfully, but these errors were encountered: