TanStack Query + Better-Auth

Do you guys use TanStack Query with Better Auth?

I use it as my async manager for my own api calls. But was wondering if I should with better-auth authClient calls? Wrap it in TanStack Query? Cause I would use its cache invalidation for queries when mutations were done.

Without it, idk how to handle authClient queries being fetched again on mutation.

Ex: list sessions…revoke session. Still shows all sessions. Hard refresh everything is up to date

I’m using Svelte, but this issue applies to all.
Was this page helpful?