The Problem
You need production-ready authentication in a Next.js App Router project without spending weeks building login flows, OAuth providers, 2FA, and session management from scratch.
Step 1: Create the Clerk Application
Sign up at clerk.com and create an application. Pick the providers you want enabled at creation (email, Google, GitHub are the standard set). You can add more later.
Grab two values from the dashboard:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY : safe for the browser
CLERK_SECRET_KEY : server-side only
Step 2: Install the SDK
npm install @clerk/nextjs
Enter fullscreen mode
Exit fullscreen mode
Add to .env.local :
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY = pk_test_... CLERK_SECRET_KEY = sk_test_...…