You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/clerk-webhooks/SKILL.md
+38-67Lines changed: 38 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,88 +24,49 @@ metadata:
24
24
25
25
### Express Webhook Handler
26
26
27
+
Clerk uses the [Standard Webhooks](https://www.standardwebhooks.com/) protocol (Clerk sends `svix-*` headers; same format). Use the `standardwebhooks` npm package:
28
+
27
29
```javascript
28
30
constexpress=require('express');
29
-
constcrypto=require('crypto');
31
+
const{ Webhook } =require('standardwebhooks');
30
32
31
33
constapp=express();
32
34
33
-
// CRITICAL: Use express.raw() for webhook endpoint - Clerk needs raw body
35
+
// CRITICAL: Use express.raw() for webhook endpoint - verification needs raw body
Copy file name to clipboardExpand all lines: skills/clerk-webhooks/examples/express/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Clerk Webhooks - Express Example
2
2
3
-
Minimal example of receiving Clerk webhooks with signature verification.
3
+
Minimal example of receiving Clerk webhooks with signature verification using the [standardwebhooks](https://www.npmjs.com/package/standardwebhooks) package (Standard Webhooks protocol).
0 commit comments