I am testing my API in Postman and am having trouble simulating a log out.
If I do a call to delete the session cookie,
the session cookie is still there afterwards, and I'm still able to access routes that require authentication.
The route handler on the server is:
server.route({
method: 'DELETE',
path: '/sessions/_current',
handler: function(req, reply){
req.auth.session.clear();
reply({}).code(204);
}
});
This is Node.js with Hapi but it shouldn't matter.
Is there a way to delete all the cookies in Postman or certain cookies manually?
Manually deleting it in the chrome browser removes the cookie from Postman.
In your chrome browser go to chrome://settings/cookies
Find the cookie and delete it
Edit:
As per Max890 comment below (in my version of Google Chrome (ver 63)) this is now
chrome://settings/content/cookies
Then go to "See all cookies and site data"
Update for Google Chrome 79.0.3945.88
chrome://settings/siteData?search=cookies