Setup diagnostics
Module setup and schema generation diagnostics use stable NUXT_AUTH_* codes. Include the code and message when reporting a problem. Each diagnostic links to a page in the error reference with its cause, fix, and a configuration example.
These codes describe module configuration and build failures. Sign-in errors retain Better Auth's error codes, and session authorization failures retain their HTTP 401 or 403 status.
In development, an auth config that cannot load produces one error report. The module skips regeneration and leaves an existing generated schema unchanged. Production builds fail on the same config error. Other schema generation failures stop setup in both modes.
After correcting a schema problem, restart Nuxt and check the generated schema before creating a database migration. See schema generation.