Auth.js · browser URL

AccessDenied

what it looks like
/api/auth/error?error=AccessDenied

What it means

Your signIn callback returned false (or threw), or the user clicked Cancel on the provider's consent screen.

Common causes

  • An allow-list in callbacks.signIn that doesn't include this email
  • The user declined on GitHub

How to fix it

  1. Log the inputs in callbacks.signIn to see why it returned false
  2. Return a redirect path string from signIn instead of false to send blocked users somewhere useful

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

Sign-in ends at error=AccessDenied. Show me my callbacks.signIn logic, log why it returns false for this user, and suggest returning a friendly redirect instead.

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