File: overview.md | Updated: 11/15/2025
š NextAuth.js is now part of Better Auth !
This is documentation for NextAuth.js v3, which is no longer actively maintained.
For up-to-date documentation, see the **latest version ** (v4).
Version: v3
On this page
An Adapter in NextAuth.js connects your application to whatever database or backend system you want to use to store data for user accounts, sessions, etc.
The adapters can be found in their own repository under nextauthjs/adapters
.
There you can find the following adapters:
Custom Adapterā
See the tutorial for creating a database Adapter for more information on how to create a custom Adapter. Have a look at the Adapter repository to see community maintained custom Adapter or add your own.
When writing your own custom Adapter in plain JavaScript, note that you can use JSDoc to get helpful editor hints and auto-completion like so:
/** @type { import("next-auth/adapters").Adapter } */const MyAdapter = () => { return { async getAdapter() { return { // your adapter methods here } }, }}
note
This will work in code editors with a strong TypeScript integration like VSCode or WebStorm. It might not work if you're using more lightweight editors like VIM or Atom.