Auth.js · server log

SessionTokenError

what it looks like
[auth][error] SessionTokenError: Read more at https://errors.authjs.dev#sessiontokenerror

What it means

With strategy "database", Auth.js couldn't read the session from the database. The adapter is misconfigured or the database can't be reached.

Common causes

  • Database down or DATABASE_URL wrong in this environment
  • Connection limit hit on serverless Postgres without pooling

How to fix it

  1. Check the cause line and your database dashboard
  2. Use your provider's pooled connection string on serverless
  3. Reuse one Prisma client (a global singleton in dev)

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 logs SessionTokenError with database sessions. Check DATABASE_URL for this environment, whether I use a pooled connection on serverless, and that my Prisma client is a singleton.

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