Report this

What is the reason for this report?

Jwt security. How secure is it?

Posted on February 5, 2022

I came across a few articles against JWT and the security vulnerabilities it causes. I just wanted to know if it is safe to use and store in local storage or if it should be avoided. Thank you!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @Cameron Hansen,

I take it you are talking about JSON Web Token, is that correct? I can’t say that I would suggest against it. There are security vulnerabilities everywhere in any technology. Let’s take it more broadly, no matter what you pick, you need to make sure everything is up to date and actively patch any APP, service or whatever you want to use. This is regarding everything not only JWT.

Regarding, JWT, they can be either signed, encrypted or both. I think this is safe enough. I mean even if you don’t encrypt it, it doesn’t mean someone can change it as you’ve signed it.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.