RJ
RJ7mo ago

Reactive queries firing after Clerk sign-out

I've noticed for a while that when a user logs out of my application (say by clicking a Clerk "Sign out" button), reactive queries which they were subscribed to at the time execute before the parent component which checks for auth is re-rendered, but without UserIdentity data, meaning that such queries then throw an error. I'm using the <AuthLoading>, <Unauthenticated />, and <Authenticated> helpers, but this nonetheless occurs in reactive queries that are children of <Authenticated>. Is this at all a known issue? Or any ideas about why this might be occurring/how to fix it?
4 Replies
Michal Srb
Michal Srb6mo ago
You're not using Jamie's caching helper right?
RJ
RJOP6mo ago
No No need to dive deep or anything if you don’t have any ideas, I was just curious to know if there may be any obvious causes here At some point I can come up with a minimal repro
ampp
ampp6mo ago
I would say I have seen that exact behavior but haven't investigated it at all. Thinking it might be something with my setup.
RJ
RJOP6mo ago
Hmm ok thanks, good to know it may not just be me