auth0 avatar

Auth0 Nextjs

Adds Auth0 authentication to Next.js apps with proper session management, protected routes, and middleware support for both App Router and Pages Router. Built on the @auth0/nextjs-auth0 v4 SDK, which handles login/logout flows automatically once you configure middleware. The setup is straightforward if you follow the src/ directory conventions and understand the Next.js 15 vs 16 middleware differences (middleware.ts vs proxy.ts). Watch out for v3 to v4 migration gotchas like the removal of withPageAuthRequired and the switch from AUTH0_ISSUER_BASE_URL to AUTH0_DOMAIN. Good for production Next.js apps that need real user authentication, not useful for SPAs or React Native where different Auth0 SDKs make more sense.

skills.sh installs
1.6K
GitHub stars
56
last updated
Aug 21, 2026

Install

$ npx -y skills add auth0/agent-skills --skill auth0-nextjs --agent claude-code

Installs into .claude/skills of the current project.

Files

Adds Auth0 authentication to Next.js apps with proper session management, protected routes, and middleware support for both App Router and Pages Router. Built on the @auth0/nextjs-auth0 v4 SDK, which handles login/logout flows automatically once you configure middleware. The setup is straightforward if you follow the src/ directory conventions and understand the Next.js 15 vs 16 middleware differences (middleware.ts vs proxy.ts). Watch out for v3 to v4 migration gotchas like the removal of withPageAuthRequired and the switch from AUTH0_ISSUER_BASE_URL to AUTH0_DOMAIN. Good for production Next.js apps that need real user authentication, not useful for SPAs or React Native where different Auth0 SDKs make more sense.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/auth0/agent-skills
Categories
Frontend Development, Backend & APIs, AI & Agent Building
First seen
Apr 16, 2026

More from auth0/agent-skills

All 23
1yonatangross avatarresponsive-patternsyonatangross/orchestkitResponsive design with Container Queries, fluid typography, cqi/cqb units, subgrid, intrinsic layouts, foldable devices, and mobile-first patterns for React app1.6Kskills.sh installs
2vercel-labs avatarreact-emailvercel-labs/json-renderReact Email renderer for json-render that turns JSON specs into HTML or plain-text emails using @react-email/components and @react-email/render. Use when workin1.4Kskills.sh installs
3mindrally avatarnextjs-typescript-tailwindcss-supabasemindrally/skillsFull-stack Next.js 14 development with TypeScript, TailwindCSS, and Supabase for building production-ready web applications.1.4Kskills.sh installs
4iress avatarui-doctoriress/design-systemAudit and review application UI for IDS compliance, accessibility, usability, and cognitive load. Covers component usage validation, WCAG accessibility checks, 1.3Kskills.sh installs
5mindrally avatarcssmindrally/skillsBest practices for CSS development including modern layout techniques, naming conventions, theming, and maintainable stylesheet architecture1.2Kskills.sh installs
6capawesome-team avatarcapacitor-reactcapawesome-team/skillsGuides the agent through Capacitor app development with React — project structure, hooks for native features, state management patterns, using Capacitor plugins1.2Kskills.sh installs