T
TanStackâ€ĸ15mo ago
deep-jade

Authenticated routes are showing after a logout on the first navigation back to it

Hi guys, I recently started using tanstack-router and I've only encountered a small issue. I have a protected route, and the thing is that when I execute a logout and immediately navigate back to the route, the screen remains empty. Even in the developer tools, I can see the entire page 🧐. If I navigate back, the problem is solved, but it's not ideal 😅. I must clarify that I am using route.invalidate() which I thought was what I was missing, but no â˜šī¸. Any help would be greatly appreciated. Thanks in advance and greetings.
2 Replies
genetic-orange
genetic-orangeâ€ĸ15mo ago
please provide a minimal complete example by forking on of the existing examples on stackblitz
deep-jade
deep-jadeOPâ€ĸ15mo ago
I solve the issue, thanks for your time, y set the gcTime to 0 opting out the route cache

Did you find this page helpful?