Auth.js v5 setup for Next.js authentication including Google OAuth, credentials provider, environment configuration, and core API integration
Complete Auth.js v5 setup for Next.js with Google OAuth, credentials authentication, and session management. Supports Google OAuth, credentials-based login, and multi-provider account linking with simplified v5 configuration and universal auth() function Includes JWT and database session strategies, role-based access control, and middleware-based route protection Provides password hashing with bcrypt, Prisma database integration, and TypeScript type safety through module augmentation Covers environment setup, sign-in/sign-out flows, protected API routes, and migration guidance from v4 to v5 Links Getting Started: https://authjs.dev/getting-started/installation?framework=Next.js Migrating to v5: https://authjs.dev/getting-started/migrating-to-v5 Google Provider: https://authjs.dev/getting-started/providers/google Credentials Provider: https://authjs.dev/getting-started/providers/credentials Core API Reference: https://authjs.dev/reference/core Session Management: https://authjs.dev/getting-started/session-management Concepts: https://authjs.dev/concepts Installation pnpm add next-auth@beta Note: Auth.js v5 is currently in beta. Use next-auth@beta to install the latest v5 version. What's New in Auth.js v5?
don't have the plugin yet? install it then click "run inline in claude" again.