If I am viewing a
Private route and then call
logout e.g. by clicking a logout button in the header, I’m seeing some weird behavior where my client is not completely logged out. My auth component still thinks it is logged in, even after a refresh. (Note: I’m using Auth0 here.)
I think it’s something to do with the order of events - my private routes are configured to redirect to a login page, which is the Auth0 login page. So perhaps when I’m viewing a private route and click logout, it’s very quickly trying to redirect to the Auth0 login (which perhaps updates the authentication state) before it’s able to redirect to my logout url (which is a non-private route).
Does this sound like I’ve configured something incorrectly, or is the combination of private routes and logout flow somehow misbehaving?