What problem does it solve?
This skill bundles best practices and up-to-date guidance for implementing Clerk authentication in modern Next.js apps, covering API keys, Next.js 16 middleware naming (proxy.ts), API version changes, webhook handling, and production considerations to reduce security pitfalls.
Core Features & Use Cases
- Migration guidance for Next.js 16 proxy.ts and the associated security considerations.
- Security best practices including authorizedParties in token verification, offline verification via jwtKey, and safe webhook verification.
- Troubleshooting & known issues covering common Clerk integration problems and how to resolve them, including CSRF and token-type mismatches.
Quick Start
- Install Clerk packages for React/Next.js
- Configure environment variables (CLERK_SECRET_KEY and NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY)
- Implement Clerk middleware with clerkMiddleware and set proper matcher