Better-Auth Integration
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 their docs, in the usage tips they say:
We recommend using the client SDK or authClient to handle authentication, rather than server actions with auth.api
And in their nextjs demo they 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