About this project

Auth.js is a set of open-source authentication packages built on standard Web APIs, designed to work with any framework on any platform in any JavaScript runtime. The project is now part of Better Auth, and the maintainers recommend new projects start with Better Auth unless specific features like stateless session management without a database are needed. Key features include: - Flexible authentication: Supports OAuth 2.0+, OIDC, email/passwordless login, and Passkeys/WebAuthn. It includes built-in providers for many popular sign-in services and can integrate with backends like Active Directory and LDAP. - Data ownership: Can be used with or without a database. Built-in adapter support covers MySQL, MariaDB, Postgres, Microsoft SQL Server, MongoDB, SQLite, and GraphQL. - Security by default: Promotes passwordless sign-in, uses CSRF tokens on POST routes, applies restrictive cookie policies, encrypts JSON Web Tokens (JWE) by default, and implements OWASP guidance. It supports tab/window syncing and session polling for short-lived sessions. - TypeScript: Written with type safety in mind. - Runtime-agnostic: Runs in Docker, Node.js, Serverless, and other environments. Advanced configuration allows custom sign-in rules, JWT encoding/decoding routines, cookie security policies, and session re-validation controls. The project is ISC licensed and open to community contributions.