DEV Community

Discussion on: Setting up an authenticated route in React

therealaltoid profile image
Zachary Orona-Calvert

Couldn't a malicious actor forge a JWT and would pass this authwall? The code only checks local storage for a JWT, it doesn't auth it with the backend. How would you implement a Axios call with this?

calier profile image
Calie Rushton Author

Hi Zachary, thanks for reading. This is really only a proof of concept, a record of my learnings if you like. The backend and axios calls are outside of the scope of this particular article, but if you figure out you should definitely write it up, I'd love to read it!