Clerk Authentication
User authentication and management with middleware, sign-in/up pages, and webhooks.
Quick Setup
1
Install the CLI: npx @integrateapi/cli add clerk
2
Create a Clerk application at clerk.com
3
Add API keys to .env.local: NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY
4
Middleware is automatically configured to protect routes
5
Customize public routes in middleware.ts
What You Can Build
✓
Protect routes with authentication middleware
✓
Get current user in server components
✓
Handle user webhooks (created, updated, deleted)
✓
Manage user metadata and roles
Installation Command
npx @integrateapi/cli add clerk