authjs-skills - Set up Auth.js v5 authentication in Next.js
Configures Auth.js v5 in Next.js with Google OAuth, credentials authentication, environment variables, API handlers, middleware, and session access.
Tags
Updated: 2026-11-04Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Configure Auth.js in Next.js
- Set up Google OAuth
- Configure credentials authentication
- Generate authentication secrets
- Create authentication route handlers
- Protect routes with middleware
- Access sessions in components
- Implement user registration
Inputs
- Next.js application
- Google OAuth credentials
- Auth.js environment variables
- User login credentials
- User database
Outputs
- Auth.js configuration file
- Authentication API handlers
- Route protection middleware
- OAuth sign-in flow
- Authenticated session data
- User registration responses
Requirements
- Next.js application
- next-auth@beta package
- AUTH_SECRET value
- Google OAuth credentials when used
- Database integration for credentials auth
- bcryptjs and zod for credentials auth
