Clerk Authentication
Add complete user management with Clerk. Covers sign-in/sign-up components, sessions and JWTs, social and passwordless login, organizations and multi-tenancy, middleware route protection, and webhooks for syncing users to your database.
This skill helps you integrate Clerk into web apps. It drops in prebuilt sign-in and user-profile components, configures social and passwordless flows, protects routes with middleware, reads sessions and JWTs on the server, models organizations and roles for multi-tenant apps, and wires webhooks to keep your database in sync with Clerk user events.
When to use
Use when adding authentication with Clerk — sign-in/sign-up UI, sessions and JWTs, social/passwordless login, organizations, middleware route protection, or user-sync webhooks.
Examples
Protect routes
Middleware auth
Set up Clerk in my Next.js app with middleware that protects /dashboard, redirects signed-out users, and reads the current user on the server
Sync users via webhook
Keep DB in sync
Add a Clerk webhook handler that verifies the signature and upserts user.created and user.updated events into my Postgres users table