DEV Community

Discussion on: How to Secure JWT in a Single-Page Application

Collapse
 
bonarhyme profile image
Bonaventure Chukwudi

Well, I see your reasons above and I appreciate that.

If you can remove every login token from the localStorage when the user logs out or when the user closes the tab, it would be nice.

Well, I don't know much about security but according to some tutors, they recommended localStorage but they warned to clear localStorage on user logout.

Collapse
 
ichavezf profile image
Eduardo Chavez

Intenta usar sessionstorage. Segun mal no receurdo se borrar al cerrar el a navegador

Some comments have been hidden by the post's author - find out more