Quickstart: Integrate Clerk with Next.js App Router
mainThis quickstart template demonstrates how to integrate Clerk authentication into a Next.js application using the App Router. By following this pattern, you will learn how to:
- Install the
@clerk/nextjsSDK. - Implement
clerkMiddleware()to protect routes. - Wrap your application with
<ClerkProvider />and use pre-built Clerk components (e.g., for sign-in, sign-up, and user profiles). - Manage user sessions and create users.