I've my dashboard and all in the react frontend which runs at one server(:port) and then I've my expressjs server running at another server(:anotherport). The issue is how do I secure the routes of react app. Like I don't want the user to access the /dashboard route in the frontend react app without authenticating. I do know that in production both ports will be unaccessible, but is there any way to protect react app routes rather leaving it open like that.
Asked
Active
Viewed 23 times
0
-
This answer should give you a direction: https://stackoverflow.com/a/43171515/1330105 – macborowy Aug 08 '20 at 09:07