Auth.js · server log

MissingAdapter

what it looks like
[auth][error] MissingAdapter: Email login requires an adapter. Read more at https://errors.authjs.dev#missingadapter

What 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

  1. Install @auth/prisma-adapter (v5 adapters live under @auth/, not @next-auth/)
  2. Pass adapter: PrismaAdapter(db) to NextAuth
  3. Add the User, Account, Session and VerificationToken models and run a migration
src/auth.ts
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,
});

works with next-auth 5.0.0-beta.32 · @auth/core 0.41.3 · Next.js 16.4.3last verified

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

$ 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.

Subscribe free