Skip to main content
Back to registry

auth0-nextjs

auth0/agent-skills

Add authentication to Next.js applications using @auth0/nextjs-auth0. Supports both App Router and Pages Router.

Installs306
Install command
npx skills add https://github.com/auth0/agent-skills --skill auth0-nextjs
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykPASS
About this skill
Add authentication to Next.js applications using @auth0/nextjs-auth0. Supports both App Router and Pages Router. For automated setup with Auth0 CLI , see Setup Guide for complete scripts. For manual setup: Create .env.local : Generate secret: openssl rand -hex 32 Important: Add .env.local to .gitignore Detect project structure first: Check whether the project uses a src/ directory (i.e. src/app/ or src/pages/ exists). This determines where to place files: Create lib/auth0.ts (or src/lib/auth0.ts if using the src/ convention): Middleware Configuration (Next.js 15 vs 16): Next.js 15 - Create middleware.ts (at project root, or src/middleware.ts if using src/ ): Next.js 16 - You have two options: Option 1: Use middleware.ts (same as Next.js 15, same src/ placement rules): Option 2: Use proxy.ts (at project root, or src/proxy.ts if using src/ ): This automatically creates endpoints: Note: In v4, wrapping with is optional. Only needed if you want to pass an initial user during server rendering to useUser() . App Router - Optionally wrap app in app/layout.tsx : Pages Router - Optionally wrap app in pages/_app.tsx : Client Component (works in both routers): Start your dev server: Visit and test the login flow. V4 Setup: Client-Side Hooks: Server-Side Methods: Common Use Cases: - Next.js 13+ application (App Router or Pages Router) - Auth0 account and application configured - If you...

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does auth0-nextjs do?

Add authentication to Next.js applications using @auth0/nextjs-auth0. Supports both App Router and Pages Router.

Is auth0-nextjs good?

auth0-nextjs does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does auth0-nextjs work with?

auth0-nextjs currently lists compatibility with codex, gemini-cli, opencode, kimi-cli, amp, github-copilot.

What are alternatives to auth0-nextjs?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install auth0-nextjs?

npx skills add https://github.com/auth0/agent-skills --skill auth0-nextjs

Related skills

More from auth0/agent-skills

Related skills

Alternatives in Software Engineering