clerk-webhooks-events

Featured

Configure Clerk webhooks and handle authentication events. Use when setting up user sync, handling auth events, or integrating Clerk with external systems via Svix webhooks. Trigger with phrases like "clerk webhooks", "clerk events", "clerk user sync", "clerk svix", "clerk event handling".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Clerk Webhooks & Events ## Overview Configure and handle Clerk webhooks for user lifecycle events and data synchronization. Clerk uses Svix for webhook delivery with HMAC-SHA256 signature verification. As of 2025, Clerk provides a built-in `verifyWebhook()` helper in `@clerk/backend` alongside the manual Svix approach. ## Prerequisites - Clerk account with webhook endpoint configured in Dashboard - HTTPS endpoint (use `ngrok` for local dev) - `CLERK_WEBHOOK_SECRET` environment variable (starts with `whsec_`) ## Instructions ### Step 1: Install Dependencies ```bash # Option A: Use @clerk/backend's built-in verifyWebhook() (recommended) # Already included with @clerk/nextjs — no extra install needed # Option B: Manual Svix verification npm install svix ``` ### Step 2: Create Webhook Endpoint (verifyWebhook — Recommended) ```typescript // app/api/webhooks/clerk/route.ts import { verifyWebhook } from '@clerk/backend/webhooks' import type { WebhookEvent } from '@clerk/nextjs/server' export async function POST(req: Request) { let evt: WebhookEvent try { evt = await verifyWebhook(req) } catch (err) { console.error('Webhook verification failed:', err) return new Response('Invalid signature', { status: 400 }) } return handleWebhookEvent(evt) } ``` ### Step 2 (Alternative): Manual Svix Verification ```typescript // app/api/webhooks/clerk/route.ts import { Webhook } from 'svix' import { headers } from 'next/headers' import type { WebhookEvent } from '@c...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category