JWT Tokens are awesome but how do you store them securely in your front-end? We’ll go over the pros and cons of localStorage and Cookies. Local storage is vulnerable because it’s easily accessible using JavaScript and an attacker can retrieve your access token and use it later.

5m read time From codeburst.io
Post cover image
Table of contents
Where should I store my tokens in the front-end?About XSS AttackCookies and CSRF AttackSo, how do I use cookies to persist my OAuth 2.0 tokens?Conclusion
1 Comment

Sort:

🇺🇸

daily.dev is the fastest growing developer platform in The United States!

We know how hard it is to be a developer. It doesn't have to be. Personalized news feed, dev community and search, much better than what's out there. Maybe ;)

Already have an account?