Tanstack with better auth
In https://www.better-auth.com/docs/integrations/tanstack it mentions 'We recommend using the client SDK or authClient but the tutorial goes on to use
auth.api.signInEmail ? I'm confused. Is auth.api the right way or not?TanStack Start Integration | Better Auth
Integrate Better Auth with TanStack Start.
1 Reply
Use the auth client for actions like sign-in, sign-out, and sign-up; use the server (auth API or middleware) for verifying sessions and protecting routes — this keeps credentials secure and avoids unnecessary round trips