auth

Implements Clerk, Descope, and Auth0 authentication for Next.js applications on Vercel.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/sharad07072007/paras --skill auth-sharad07072007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth
Source: https://github.com/sharad07072007/paras/tree/main/.agents/plugins/vercel/skills/auth
Command: npx skills add https://github.com/sharad07072007/paras --skill auth-sharad07072007

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up user authentication in Next.js involves choosing between providers, configuring middleware, protecting routes, and handling sign-in flows, with frequent breaking changes across SDK versions. This Skill provides current, correct integration patterns for Clerk, Descope, and Auth0 on Vercel. ## Core Features & Use Cases - Clerk Integration: Native Vercel Marketplace provisioning, clerkMiddleware setup, route protection with createRouteMatcher, and pre-built SignIn/SignUp components. - Descope and Auth0 Setup: Marketplace installation, provider configuration, middleware auth, and session access patterns for both platforms. - Migration Guidance: Clerk Core 3 breaking changes (async auth(), removed authMiddleware) and Auth.js v5 migration from legacy next-auth v4. - Use Case: You need to add login to a Next.js app deployed on Vercel. The Skill walks you through installing Clerk from the Marketplace, configuring middleware to protect /dashboard routes, and adding sign-in pages with auto-provisioned environment variables. ## Quick Start Add user authentication to my Next.js app using Clerk with protected dashboard routes and sign-in pages.

Frequently Asked Questions about auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication to a Next.js app on Vercel?

Install Clerk from the Vercel Marketplace with 'vercel integration add clerk', which auto-provisions environment variables, then add clerkMiddleware to middleware.ts and wrap your root layout in ClerkProvider. Descope and Auth0 are alternatives with similar middleware-based setups.

Clerk vs Auth0 vs Descope for Next.js authentication?

Clerk offers the fastest Vercel setup with native Marketplace integration and pre-built UI components. Descope suits passwordless and social login flows with a visual flow builder. Auth0 fits enterprise needs like SSO, SAML, and multi-tenant identity.

How do I protect routes with Clerk middleware in Next.js?

Use clerkMiddleware with createRouteMatcher to define protected routes like /dashboard or /api, then call await auth.protect() inside the middleware handler for matching requests. Unauthenticated users are redirected to sign-in automatically.

Does Clerk auth() work synchronously in the latest SDK?

No, auth() is async in Clerk Core 3 and must be awaited: const { userId } = await auth(). The old authMiddleware() was removed and replaced by clerkMiddleware(), and clerkClient() is also now async.

How do I migrate from next-auth v4 to Auth.js v5?

Legacy next-auth v4 patterns using NextAuthOptions and authOptions should migrate to Auth.js v5 with the new universal auth() helper. Alternatively, managed providers like Clerk or Auth0 handle JWT sessions, CSRF protection, and token rotation built-in.

Should I use bcrypt for password hashing in my Next.js app?

Manual password hashing with bcrypt or argon2 is discouraged when managed providers are available. Clerk and Auth0 include built-in password hashing, rate limiting, and breach detection, reducing the security burden of hand-rolled authentication.