Auth · ranked 02
Auth.js
Also known as NextAuth
Open-source auth for Next.js and other frameworks. You host it.
Best for Auth you host, for free
Auth.js, formerly NextAuth, is an open-source authentication library. You add providers, keep sessions in your app, and host it yourself. Use it when you want auth in the repo and a bill of zero. Use Clerk when you want someone else to own the edge cases.
Best use cases
- OAuth login in a Next.js app
- Keeping users in your own database
- Avoiding a per-user auth vendor
Pros
- + Open source and free
- + Many OAuth providers
- + The data stays in your app
Cons
- − You own the bugs, the emails, and the session story
- − The API has changed across major versions, so follow current docs
Pricing
Free
Open source and free. OAuth providers may have their own terms.