Auth. Free. Open Source.
Own your user data. Connect to your own database with a simple adapter, any from 100+ providers, and avoid vendor lock-in forever.
// auth.ts
import NextAuth from "next-auth"
import GitHub from "next-auth/providers/github"
export const { auth, handlers } = NextAuth({ providers: [GitHub] })
// middleware.ts
export { auth as middleware } from "@auth"
// app/api/auth/[...nextauth]/route.ts
import { handlers } from "@auth"
export const { GET, POST } = handlers
// auth.ts
import NextAuth from "next-auth"
import GitHub from "next-auth/providers/github"
export const { auth, handlers } = NextAuth({ providers: [GitHub] })
// middleware.ts
export { auth as middleware } from "@auth"
// app/api/auth/[...nextauth]/route.ts
import { handlers } from "@auth"
export const { GET, POST } = handlers
Trusted by the best in the game
The category-defining generative AI platform from OpenAI, enabling developers to build intelligent applications.
Open-source scheduling infrastructure for everyone, from individuals to enterprise scale.
The platform for frontend developers, providing the speed and reliability innovators need to create at the moment of inspiration.
An open-source link management tool for modern marketing teams to create, share, and track short links.
An opinionated, modular stack focused on simplicity, and type safety, recommending Auth.js as its primary auth solution.
A creative powerhouse providing creators with royalty-free music, SFX, stock footage, and video editing software.
Everything you need, nothing you don’t
Auth.js is a complete, open-source authentication solution, designed to be flexible and secure, giving you full control over your user data.
Built for the edge with first-class support for Next.js, SvelteKit, SolidStart, and more.
Connect to your own database with our adapter system. Never get locked into a vendor’s user table again.
Choose from 50+ pre-configured providers or add your own. Customize everything from UI to session handling with callbacks.
import NextAuth from "next-auth"
export const { handlers, signIn, signOut, auth } = NextAuth({
providers: [],
})
Sign in with * anything *
With over 100 popular providers, you can let your users sign in with the services they already use and trust.
Built by developers, for developers
Auth.js is a community-driven project, backed by a transparent, open-source philosophy. Your data is yours, and the code is open to everyone.
A testament to the community’s trust and love for the project.
Powering millions of applications every month, from side projects to enterprise.
A massive thank you to everyone who has contributed to the project.
Ready to secure your app?
Get started in minutes with our quickstart guide or dive into the documentation to see everything Auth.js has to offer.