DEV Community


Discussion on: How to securely store JWT tokens.

learnitmyway profile image

"when a user closes their browser, the JWT will disappear" - I believe browsers can also restore sessions these days.

gkoniaris profile image
George Koniaris Author

Hi David, this is specific to sessionStorage. If you mean traditional sessions through cookies, of course, they are able to restore them, actually, they never lose them. Based on MDN sessionStorage is cleared when you close the tab or the browser.