Better-Auth with Tanstack Start + Tanstack Query
I have successfully refactored the better-auth nextjs demo to tanstack start
https://github.com/better-auth/better-auth/tree/canary/demo/nextjs
But I have a question:
In the docs, in the usage tips it is stated that:
We recommend using the client SDK or authClient to handle authentication, rather than server actions with auth.api
And in the nextjs demo,we have this useQuery:
My question is: should I replace it with useSuspenseQuery, and use a server function in the loader + ensureQueryData that fetches the user list using auth.api.listUsers
GitHub
better-auth/demo/nextjs at canary · better-auth/better-auth
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
0 Replies