I'm working on a react app, the issue is that after logging in and click on back button inside browser I can see the login page,
What should be the best approach to prevent this?
- Create a middleware in server side to protect this routes?
- Create a function that checks when the user clicks back/forward button?
Can you guide me a little bit??