
Authjs Skills
This is a practical Auth.js v5 implementation guide covering Google OAuth and credentials-based authentication for Next.js apps. It walks through the full setup from environment variables to middleware configuration, including proper password hashing with bcrypt and session management. The skill focuses on the App Router pattern and includes both providers configured in a single auth.ts file, which is the current v5 approach. Useful if you're migrating from v4 or starting fresh and need working examples of the authorize callback, protected routes, and custom sign-in pages. The credentials section is more complete than most guides, with actual Zod validation and database lookups instead of placeholder comments.
- skills.sh installs
- 797
- GitHub stars
- 23
- last updated
- Aug 21, 2026
Install
$ npx -y skills add gocallum/nextjs16-agent-skills --skill authjs-skills --agent claude-codeInstalls into .claude/skills of the current project.
Files
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?
Key Changes from v4
- Simplified Configuration: More streamlined setup with better TypeScript support
- Universal
auth()Export: Single function for authentication across all contexts - Enhanced Security: Improved CSRF protection and session handling
- Edge Runtime Support: Full compatibility with Edge Runtime and middleware
- Better Type Safety: Improved TypeScript definitions throughout
Environment Variables
Required Environment Variables
Sponsors
Details
- Repository
- github.com/gocallum/nextjs16-agent-skills
- Categories
- Frontend Development, Backend & APIs, Security, AI & Agent Building
- First seen
- May 16, 2026