Pro.D
Pro.D
BABetter Auth
Created by Pro.D on 4/15/2025 in #help
I think there is some type error
No description
4 replies
BABetter Auth
Created by Pro.D on 4/13/2025 in #help
What would be the most secure and preforming way to use Better Auth with Next.js
I am building a Next.js project and I was wondering what would be the best way to use it with better auth. Q1. As the docs say there are two ways we can use any auth function either with authClient or auth. So if we are talking about security is it good to use authClient, I mean it would be easy to avoid validation if the things are happening on the client, If we use server actions with authServer we can do validation both sides Q2. If I am using server components or layouts files, should I use authServer or authClient. ( What I am currently doing is I am using authServer api and passing headers along. Q3. What will be best performance ? as i currently stated I am higly dependent on authServer api which makes a ton of db calls, is it same in case of authClient? And in the last what would be best for security (keeping everything in mind)
2 replies