DEV Community

Discussion on: How to Secure JWT in a Single-Page Application

Collapse
 
petrshchukin profile image
PetrShchukin • Edited

Nice article, but unfortunately your approach with JWT token in cookie won't work. You said "But remember that this approach only works if the React app and the BackEnd server hosted in same domain." It doesn't matter in this case, a requests will be sent from client browser. React server merely sends html and js code to a client machine.

Some comments have been hidden by the post's author - find out more