Nuxt · NUXT0003

Mount Better Auth at the standard catch-all route

Checks that Nuxt project code includes the standard auth handler mount needed for predictable behavior.
NUXT0003vite-doctor/nuxt-better-authauthwarnSuggestion
nuxt-better-auth/require-standard-auth-handler-mountsrc/rule-packs/nuxt/rules/nuxt-better-auth.ts

Run this rule

pnpm nuxt doctor --rules nuxt-better-auth/require-standard-auth-handler-mount

Why it matters

Nuxt gives this pattern a specific contract. Staying inside that contract makes the code easier to test, refactor, and run across server and client runtimes.

Add standard auth handler mount where Nuxt expects it, close to the code that depends on it.

Example

Mount Better Auth handler

Before

// server/api/auth/[...all].ts is missing

After

export default defineEventHandler((event) => {
  return auth.handler(toWebRequest(event))
})
Copyright © 2026