Auth.js
Open-source authentication library built on standard Web APIs, supporting OAuth, email/passwordless and credential-based sign-in for any JavaScript framework or runtime.
Overview
Auth.js (formerly NextAuth.js) is a set of open-source authentication packages built on standard Web APIs, designed to work with any JavaScript framework, runtime, or hosting model - including serverless and Docker deployments, not just Next.js.
It supports OAuth 2.0 and OpenID Connect out of the box, along with email/passwordless sign-in and Passkeys/WebAuthn, and can be used with or without a database: when a database is used, official adapters cover Postgres, MySQL, MariaDB, SQL Server, MongoDB, SQLite and more. Security defaults include CSRF protection, encrypted JSON Web Tokens, and restrictive cookie policies aligned with OWASP guidance.
Auth.js is a good fit for teams that want to own their authentication data and logic directly in their application rather than depending on a hosted identity provider. Its official README notes that the project is now part of Better Auth, and recommends new projects start there unless they specifically need Auth.js's stateless, database-optional session handling.
- Categories
- Authentication & Security
- Languages
- TypeScript
- License
- ISC
Related Projects
Keycloak
Apache-2.0Open source identity and access management solution with single sign-on, OAuth2 and OpenID Connect support.
- Authentication & Security
Authelia
Apache-2.0Self-hosted single sign-on and two-factor authentication portal that sits in front of your reverse proxy to protect existing web apps.
- Authentication & Security
Appwrite
BSD-3-ClauseOpen-source backend platform providing authentication, databases, storage, functions and realtime APIs, self-hosted or as a managed cloud service.
- Backend
- Database
- Authentication & Security
Ory Kratos
Apache-2.0API-first, headless identity and user management server for cloud-native applications, covering login, registration, recovery, and profile management.
- Authentication & Security
Spotted an error? Suggest an edit on GitHub.