Auth.js Authentication
Implements and troubleshoots production-ready Auth.js v5 authentication for Next.js App Router and Cloudflare Workers.
Streamlines the setup and configuration of Auth.js v5 (formerly NextAuth.js) across Next.js and Cloudflare Workers applications. This skill guides the implementation of OAuth providers, credentials auth, and magic links while configuring database adapters such as Prisma and Cloudflare D1. It automatically enforces edge-runtime compatibility, resolves common configuration traps like missing AUTH_SECRET or CallbackRouteErrors, optimizes session strategies between JWT and database sessions, and sets up robust role-based access control.
主要功能
01Configures Next.js App Router and Cloudflare Workers Auth.js v5 stacks
02Implements OAuth, credentials, and magic link authentication flows
03Enforces edge-compatible middleware and JWT session strategies
04Prevents and fixes common errors like CallbackRouteError and JWEDecryptionFailed
05Integrates database adapters including Cloudflare D1 and Prisma
060 GitHub stars
使用场景
01Setting up end-to-end OAuth and credentials authentication in Next.js 15 projects
02Deploying edge-compatible authentication on Cloudflare Workers with D1 databases
03Migrating legacy NextAuth.js v4 applications to Auth.js v5 architectures