Auth.js Authentication
authjs.dev
1
Leaving SiteNav
External Link Disclaimer
You are about to visit authjs.dev. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Auth.js, formerly known as NextAuth.js, is an open-source authentication library for web applications created by Balázs Orbán and Iain Collins in 2020, providing a flexible, framework-agnostic authentication solution supporting over eighty built-in OAuth providers including Google, GitHub, Apple, Microsoft, Facebook, Discord, Auth0, and many more, along with email magic links, credentials-based authentication, and custom providers, adopted by over one million weekly npm users and deployed by companies including Vercel, Cal.com, and Dub.co for their authentication needs. The provider system enables configuring multiple authentication methods simultaneously, with OAuth providers handling the complete OAuth and OpenID Connect flow including authorization code exchange, token refresh, and user profile fetching, email providers sending magic links through configurable email services including Resend, SendGrid, and Postmark, and credential providers for username and password authentication, with custom providers enabling integration with any authentication backend through a simple callback interface. The session management supports both JSON Web Token-based stateless sessions and database-backed sessions, with the JWT strategy storing encrypted session data in an HTTP-only cookie for zero-database authentication, and the database strategy persisting sessions in a database adapter for server-side session invalidation and multi-device session management, with the adapter system supporting Prisma, Drizzle, MongoDB, Redis, Fauna, Supabase, and custom adapters. The callback system provides fine-grained control over the authentication flow with callbacks for sign-in authorization, redirect handling, JWT creation and update, and session object customization. The CSRF protection. The cookie configuration. The multi-framework support including Next.js, SvelteKit, SolidStart, and Express. Designed by Balázs Orbán. Designed for web application developers.
Statistics
1
Views
0
Clicks
0
Like
0
Dislike