Open jainpawan21 opened 5 years ago
You can do route authentication by using HOC in React-Router. Below could be helpful for you. This is the official example by the React Router team.
https://reacttraining.com/react-router/web/example/auth-workflow
Thanks, Neha
Thanks Mam
How to protect routes in react.js? I want to protect whole react-app routes unless user either register or login in the app and after then user can't access that register and login routes but can access other routes?