I tried testing your protected route (/home) which is accessed only after the user logs in, however, if I type the route in my URL it gives me an error. A possible fix for this would be to set a flag to false if the user is not logged and if he tries to access /home without logging in (check flag value), he should be redirected to your login page.
I tried testing your protected route (/home) which is accessed only after the user logs in, however, if I type the route in my URL it gives me an error. A possible fix for this would be to set a flag to false if the user is not logged and if he tries to access /home without logging in (check flag value), he should be redirected to your login page.