Reputation: 97
Where do I store the CSRF token in my React page? I read that it should be stored in a hidden input field, but then how do I access it? It seems like the only way to access it is by interacting with the DOM, which I was told to avoid doing when using React. I also read that it is safe to store CSRF tokens in React states. Wouldn't this make it vulnerable to XSS attacks?
Upvotes: 2
Views: 330