comparar · Authentication
Both work with Next.js. In a kit you pick one, and your agent gets the rule to use only that one.
| Better Auth | Supabase | |
|---|---|---|
| What it is | Auth in your own database: email, OAuth, 2FA, organizations. | Auth and data clients for web and mobile JavaScript. |
| Frameworks | Next.js | React, Vue, Svelte, Solid, Vanilla, Next.js, Nuxt, SvelteKit, Astro, Angular, Expo, React Native |
| Paquetes | better-auth @better-auth/drizzle-adapter | @supabase/supabase-js@^2.119.0 |
| Skill oficial | better-auth/skills@better-auth-best-practices, better-auth/skills@better-auth-security-best-practices, better-auth/skills@create-auth, better-auth/skills@email-and-password-best-practices, better-auth/skills@organization-best-practices, better-auth/skills@two-factor-authentication-best-practices | — |
| How your agent uses it | Read the session on the server with `auth.api.getSession({ headers: await headers() })` (from `@/lib/auth`) and on the client with `authClient.useSession()` (from `@/lib/auth-client`). Add providers and plugins in `src/lib/auth.ts`. | Create separate browser and server clients. Only the project URL and publishable/anon key may reach the browser; service-role keys stay on the server. Enforce database RLS and server authorization. |
| Kits that offer it | saas-ai-next, saas-next-better-auth, saas-next-supabase, saas-t3, web-next | chrome-extension, desktop-electron, desktop-tauri, mobile-expo, mobile-expo-supabase, mobile-ignite, mobile-ionic-react, saas-ai-next, saas-next-better-auth, saas-next-supabase, saas-nuxt, saas-sveltekit, saas-t3, saas-tanstack-start, spa-vite-react, web-angular, web-astro, web-next, web-nuxt, web-react-router, web-sveltekit, web-tanstack-start, web-vue-vite |
| Chosen in | 0 installs | 0 installs |