Nice post, I just missed some security considerations:
Just don't use localStorage or sessionStorage for sensitive data (like JWT tokens), both are vulnerable to XSS attacks.
Cookies, besides their limitations, have a much more mature model for sensitive data (If you use the correct flags like httpOnly, https and sameSite). This is the only point where you should use it instead of localStorage/sessionStoreage.
That's a really good point!
Consider security issues, those sensitive data should not stay in front-end area because people can have access to it. The best way I feel would be to store those data in the database but not client side storage.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice post, I just missed some security considerations:
Just don't use localStorage or sessionStorage for sensitive data (like JWT tokens), both are vulnerable to XSS attacks.
Cookies, besides their limitations, have a much more mature model for sensitive data (If you use the correct flags like httpOnly, https and sameSite). This is the only point where you should use it instead of localStorage/sessionStoreage.
That's a really good point!
Consider security issues, those sensitive data should not stay in front-end area because people can have access to it. The best way I feel would be to store those data in the database but not client side storage.