React and storing jwt token in localstorage
问题 I just recently started using jwt in a react+express app and came across the issue of where to store the jwt token. It seems like the two major options are localStorage and cookies with both being venerable to various attacks (XSS and CRSF). But i found that react is supposedly XSS safe (What does it mean when they say React is XSS protected?) so is it okay to use localStorage to store the jwt? If not whats the industry standard for this? 回答1: Both cookies and localStorage can be acceptable