Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+15 votes

So at this point in my individual project, I am having an issue that I am not sure how to solve. When I am in my application, if I try to refresh the page or try and put in a url that does have a route, it takes me back to the login page and I have to log back in. I do have the routes protected, so that means you do have to be logged in to access pages other than the login page, but I was already logged in when it redirects me. I have looked into authentication state persistence, but I am not sure why it is not working because the default state is to persist even after the application has been closed.

asked in CSC490_Spring2019 by (1 point)

1 Answer

+5 votes

Sorry for the late response!

The best way to debug this is to log out the authentication state when you refresh the page. I think there's something wrong with state persisting, so you can check if the state persists this way.

If possible, would you mind uploading what the console outputs and how you are protecting the routes?

answered by (1 point)
...