mozilla / node-client-sessions

secure sessions stored in cookies
Mozilla Public License 2.0
759 stars 104 forks source link

Implement cookie cleanup #114

Closed baloo closed 8 years ago

baloo commented 8 years ago

Allow user to unset cookies from the browser.

req.session.cleanup();

will trigger:

Set-Cookie: session=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; httponly

Forcing cookie to be deleted from browser.

seanmonstar commented 8 years ago

It is currently possible to do similarly like this:

req.session.reset();
req.session.setDuration(0); // expires in 0 seconds