Skip to content
StackPick

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.

Alternatives

Auth

8.2

Clerk

Hosted auth with prebuilt components for Next.js and friends.

Best for Sign-in components you do not design yourself

FreemiumDetails

Auth

6.9

WorkOS

Enterprise SSO, directory sync, and auth for B2B apps.

Best for SSO when a company customer requires it

Check siteDetails