Minor Changes
-
Introduce a
verifyWebhook()function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification usingSvixand is now available across all backend and fullstack SDKs. (#5468) by @wobsorianoTo get started, install
svix, which Clerk uses to verify its webhooks:npm install svix
Then in your webhook route handler, import
verifyWebhook()from the Next.js SDK:// app/api/webhooks/route.ts import { verifyWebhook } from '@clerk/nextjs/webhooks'; export async function POST(req: Request) { try { const evt = await verifyWebhook(req); // Do something with payload const { id } = evt.data; const eventType = evt.type; console.log(`Received webhook with ID ${id} and event type of ${eventType}`); console.log('Webhook payload:', body); return new Response('Webhook received', { status: 200 }); } catch (err) { console.error('Error: Could not verify webhook:', err); return new Response('Error: Verification error', { status: 400, }); } }
For more information on how to sync Clerk data to your app with webhooks, see our guide.
-
Redirect to tasks on
auth.protectandauth.redirectToSignIn(#5440) by @LauraBeatris
Patch Changes
-
Fixing a Typing error in clerkMiddleware (#5470) by @jacekradko
-
Remove telemtry event from
clerkMiddleware(). (#5501) by @brkalow -
Updated dependencies [
60a9a51,e984494,cd6ee92,ec4521b,38828ae,f30fa75,9c68678,fe065a9,619cde8]:- @clerk/backend@1.26.0
- @clerk/shared@3.3.0
- @clerk/clerk-react@5.25.6
- @clerk/types@4.50.2