Description
NextAuth.js is an open-source authentication library for Next.js, documented at next-auth.js.org. It lets you add sign-in to an app with built-in providers such as Google, Facebook, Apple, GitHub, Discord and many others, plus email, passwordless and magic-link sign-in. You can use any username and password store, and you can connect to OAuth 1.0 and 2.0 services. It is built for serverless and runs anywhere, and it works with or without a database. The site lists MySQL, MariaDB, Postgres, MongoDB and SQLite, and you can write a custom database adapter. You can choose database sessions or JWT. The library includes signed, server-only cookies, CSRF token checks on POST requests, tab syncing and automatic revalidation. It does not rely on client-side JavaScript to protect pages and API routes. The page says that NextAuth.js is now part of Better Auth. Install it with npm install next-auth. The site links its releases on GitHub, where the source code is public.…
Highlights
- Built-in sign-in for Google, GitHub, Discord and many more
- Email, passwordless and magic-link sign-in
- Database sessions or JWT with your choice of database
- Signed cookies and CSRF checks for security
Ratings & Reviews
No ratings yet
Be the first to rate NextAuth.
People also visit

nextjs-authentication
Provides authentication implementation patterns for Next.js 15+ App Router
NextAuth FAQ
Is NextAuth.js open source?
Yes. The source is on GitHub, and the site links the repository and its releases.
How do I install it?
Run npm install next-auth, then add your providers in an API route for Next.js.
Which databases does it support?
The site lists MySQL, MariaDB, Postgres, MongoDB and SQLite, or no database. You can also write a custom adapter.
Which sign-in services are included?
The site lists built-in support for many services, including Google, Apple, Facebook, Discord, GitHub, Auth0 and Okta, plus email and credentials.
Is NextAuth.js still active?
The site says NextAuth.js is now part of Better Auth.
What are the best NextAuth alternatives?
Popular alternatives to NextAuth include Auth.js, Clerk and Auth. See all NextAuth alternatives









