Auth.js · server log
MissingAdapter
[auth][error] MissingAdapter: Email login requires an adapter. Read more at https://errors.authjs.dev#missingadapterWhat it means
Magic links (Email / Nodemailer / Resend providers) and session: { strategy: "database" } both need a database adapter to store tokens and sessions.
Common causes
- Added the Nodemailer or Resend provider without an adapter
- Set strategy: "database" without an adapter
- Imported the adapter but passed it in only one of two config files
How to fix it
- Install @auth/prisma-adapter (v5 adapters live under @auth/, not @next-auth/)
- Pass adapter: PrismaAdapter(db) to NextAuth
- Add the User, Account, Session and VerificationToken models and run a migration
import { PrismaAdapter } from "@auth/prisma-adapter";
import { db } from "@/lib/db";
export const { handlers, auth, signIn, signOut } = NextAuth({
adapter: PrismaAdapter(db),
session: { strategy: "database" },
providers,
});Prompt for Cursor or Claude Code
Auth.js says MissingAdapter. Wire @auth/prisma-adapter into auth.ts, check my Prisma schema has the User, Account, Session and VerificationToken models from the Auth.js Prisma adapter docs, and give me the migration command.Not quite your error? Paste yours into the free VibeBoot Doctor or browse the Auth.js error fixer.
next: skip the next one
Skip the setup. The VibeBoot SaaS Starter ships Auth.js v5 already wired (GitHub sign-in, optional email magic links, Prisma adapter), plus Stripe and a database on Next.js 16.4.3. $49, one-time.
14-day money-back guarantee · lifetime updates
Other Auth.js errors
$ fixed it? get the next one first
New fixes for what AI agents break, by email.
When we add a fix or a Cursor rule for a new Next.js, Auth.js, Prisma or Stripe break, it goes out in the VibeBoot newsletter. Free, occasional, unsubscribe in one click.