You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And here the Expiration of the cookie in the client's header after third request.
Wed Nov 17 2021 08:30:33 GMT+0200 (Eastern European Standard Time)
Obviously if the user surf all the time (make a lot of requests) the expiration in the database will be maxAge later then the expiration of the cookie so the sessions record will stay in the database maxAge longer. For example if the maxAge is 12 hours and the user surfs, make request all the time. The time different between the expiration of the cookie and the record in the sessions table will be a little bit less then 12 hours so this record will stay in the database for the next 12 hours until expire and check function delete it.
Solution: In my opinion the rolling option from expressSession must be taken into account.
The text was updated successfully, but these errors were encountered:
Hi @lachezargrigorov - thanks for submitting this issue.
It looks like for at least some commonly used express session stores (e.g. MongoStore) , it is expected for rolling to be used together with resave=true:
That is my express session configuration.
And this is how the record in the sessions table looks like after each request.
And here the Expiration of the cookie in the client's header after third request.
Wed Nov 17 2021 08:30:33 GMT+0200 (Eastern European Standard Time)
Obviously if the user surf all the time (make a lot of requests) the expiration in the database will be maxAge later then the expiration of the cookie so the sessions record will stay in the database maxAge longer. For example if the maxAge is 12 hours and the user surfs, make request all the time. The time different between the expiration of the cookie and the record in the sessions table will be a little bit less then 12 hours so this record will stay in the database for the next 12 hours until expire and check function delete it.
Solution: In my opinion the rolling option from expressSession must be taken into account.
The text was updated successfully, but these errors were encountered: