Hello I have a react app which is using JWT for the authentification. We store this JWT in the local storage but the security in our team is telling us that it is not secure because this token can be access via Javascript.
They are asking using to store it in cookie instead. Because it is not secure. But for me cookie can be access in js too, so I don't see the point here.
Do you know why cookie storage should be more secure than local and session storage? Is it really the case?
What is the safest way to use JWT?
I'm not asking how should I use JWT but what is the best way to secure it.