Organization Cache Not Invalidated on Logout

Hi everyone, I am experiencing a caching issue with useListOrganizations() and useActiveOrganization(). When logging out and logging back in with a different user, the queries from useListOrganizations() and useActiveOrganization() return cached data from the previous user's session instead of fetching fresh data for the newly authenticated user. Is there any known fix for this? Update: I found calling these two methods after signing in fixes the issue, but it is hard to believe that this is best practice:
authClient.$store.notify("$listOrg");
authClient.$store.notify("$activeOrgSignal");
authClient.$store.notify("$listOrg");
authClient.$store.notify("$activeOrgSignal");
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?