1

I am using node.js + express server. And maintaining a session for the login users.

I want to know how does a logged user to logout when the server is unreachable?

I know In the normal approach, I can call req.logout() on a request object in the express server. And that may clear cookies in the browser and session data on the server.

But what if when the server is unreachable once the user logged in? How can they log out themselves in the browser ?

欧阳维杰
  • 1,608
  • 1
  • 14
  • 22

1 Answers1

0

Use the Javascript on the client side as shown here Clearing all cookies with JavaScript

Otherwise, if these are session cookies, they will clear when the user close the browser. Any other cookies should be cleared by the user manually using a browser.

senyor
  • 119
  • 1
  • 5