Quick Comparison
| Lucia | NextAuth.js (Auth.js) | |
|---|---|---|
| Approach | Low-level, you control everything | High-level, convention-based |
| Framework | Any (Next.js, SvelteKit, Astro, etc.) | Next.js (Auth.js for others) |
| Database | Any (you write the adapter) | Many built-in adapters |
| Session | Cookie-based (you manage) | JWT or database sessions |
| OAuth | Arctic library (separate) | Built-in providers |
| Bundle | Tiny | Larger |
When to Use Lucia
- You want full control over auth flow
- You’re not using Next.js
- You want to understand how auth works
- You need custom session handling
When to Use NextAuth.js
- You want auth working in 5 minutes
- You need many OAuth providers quickly
- You’re building a Next.js app
- You don’t want to manage sessions yourself
Verdict
Lucia for control and learning. NextAuth.js for speed and convenience. If you’re building a Next.js app and just need Google/GitHub login, NextAuth is faster to set up. If you want to understand auth deeply, Lucia teaches you more.