Auth.js (NextAuth) — Authentication for the Web Overview Auth.js is the successor to NextAuth.js. For Next.js you install (the v5 line; on npm is still v4.24). Config lives in one root that exports , , and ; replaces , and everywhere (server components, route handlers, proxy). Environment variables use the prefix and provider credentials named / are picked up automatically. Status to know before choosing it: since September 2025 the project is maintained by the Better Auth team, in maintenance mode (security fixes, no new features), and Better Auth recommends itself for new projects. Existing…