Auth.js
Open Source self-hosted authentication for Next.js and more
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:
- Credentials - Email (or username) and password
- OAuth - Sign in with Google, Facebook, GitHub, etc.
- Magic Links - Sign in with a link sent to your email (requires an email provider such as SendGrid)
- 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.