Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is destroying the user session enough during logout?

I wanted to understand how we can implement a safe logout method in a website. I am trying a logout page in jsp. Is destroying a session enough when the user clicks logout ? If it isn't what are the steps necessary for the logout, to be a safe operation for the user ?

like image 477
Suhail Gupta Avatar asked Nov 29 '25 05:11

Suhail Gupta


2 Answers

Generally I'd say yes, but it depends on what other information you may be storing client-side. For example, if you have any cookies with sensitive information (hopefully you don't) then you should clear those out as well.

like image 155
Eric Petroelje Avatar answered Dec 01 '25 20:12

Eric Petroelje


If you stored any user related cookies, you need to clean-up them as well. In other words, any information that used by your server to identify a user should be cleaned up. If it's only the session - then in you case that is sufficient.

like image 21
Eugene Retunsky Avatar answered Dec 01 '25 20:12

Eugene Retunsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!