Auth.js

Open Source self-hosted authentication for Next.js and more

Visit Website

Formerly known as NextAuth or NextAuth.js, Auth.js is a self-hosted open source solution for authentication with Next.js, SvelteKit, or Express.js applications.

Auth.js supports four different types of authentication:

  1. Credentials - Email (or username) and password
  2. OAuth - Sign in with Google, Facebook, GitHub, etc.
  3. Magic Links - Sign in with a link sent to your email (requires an email provider such as SendGrid)
  4. WebAuthn - Passkeys

Auth.js works with many different database or storage solutions, including some open source options, and some cloud-based options.

Generally speaking, you might consider using Auth.js if you want to self-host and directly integrate your authentication solution into your application and not rely on a third-party service.