← All components

Auth0 Authentication

Auth0 authentication integration for Next.js App Router using the real @auth0/nextjs-auth0 v4 API: an Auth0Client instance, middleware-mounted auth routes (no custom route handler), and server-side session checks.

Copy the files below, or open this folder on GitHub. Each file is stamped with a limited-use licence, generator and date. SHA-256 is of the published catalog bytes, before the stamp.

id
auth0
stack
Next.js
version
2.0.0
compatibility
nextjs >=16 <17 · react >=19 <20
requires
nextjs-base
env vars
AUTH0_DOMAIN, AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_SECRET, APP_BASE_URL
Verified passing · daily buildIntegrity sha256:cf204e57e1b3b94c

Files (3)

lib/auth0.ts · sha256:cf204e57e1b3b94c…
// Licensed by BotKelp — https://www.botkelp.com

/**
 * Auth0 client instance.
 *
 * Source: https://github.com/auth0/nextjs-auth0/blob/v4.29.0/README.md
 * Verified: 2026-09-06
 */
import { Auth0Client } from "@auth0/nextjs-auth0/server";

export const auth0 = new Auth0Client();