What problem does it solve?
This Skill streamlines authenticating Next.js apps by providing Auth.js v5 integration with Google OAuth and Credentials provider, reducing setup overhead and ensuring up-to-date patterns for secure sessions.
Core Features & Use Cases
- Unified auth: Single auth() export for multiple contexts (server, middleware, client) across Next.js App Router.
- Provider integrations: Google OAuth, Credentials, and optional database adapters.
- Environment & security: Guidance on AUTH_SECRET, environment variables, and secure session handling.
- Use Case: Migrate a Next.js project from v4 to v5 with minimal changes while preserving strong security practices.
Quick Start
Install dependencies and add a basic NextAuth config using Google and Credentials providers. Create auth.ts at the project root, configure the auth() export, and set up API routes and middleware as shown in the examples.