0

I am using cookie-parser to create a http-only cookie that holds the token for a logged-in user.

Then I need to either destroy that cookie or make it expire, when the user hits "logout".

How can I destroy (or at least edit) the cookie?

Will the following do the trick ?

res.cookie("SESSIONID", null, {httpOnly:true, secure:true});

Thank you

slevin
  • 4,166
  • 20
  • 69
  • 129

0 Answers0