KindeK
Kinde9mo ago
46 replies
__maxom__

Kinde Webhooks not being sent

Hi,

I'm currently facing an issue where Kinde is not sending any webhook event to my endpoint in the prod environment. The endpoint is deployed as a Cloudflare worker and I do not see any logs and I also do not see values being populated in my DB.

To debug the issue, I did the following:
1. Change the Webhook URL in Prod to a local webhook running with Ngrok with the development environment JWKS URI and create a role to trigger the event.
2. The call fails (which is expected) due to the kid mismatch between the prod event header kid and dev JWKS URI kid in the keys.
3. I intentionally did the above step so that Kinde can keep retrying the request during my debugging process.
4. Grab the Kinde JWT event from the local console.log
5. Use this event as the payload to my actual CF worker endpoint that was linked to prod webhook using Postman. This request succeeds. I can see the logs and I can see my DB being populated. This confirmed that my CF worker endpoint is configured properly with the prod env JWKS URI and that it can be invoked.
6. Switch over the Webhook URL in prod from the local Ngrok endpoint to the CF worker endpoint so that the retrying of the failed events can hit the CF worker endpoint. I do not see any invocations.

Note:
1. The configurations of both the webhooks are the same, i.e. they listen to the same events.
2. The endpoint works as I can successfully make requests using Postman.
3. I'm aware of the exponential backoff and retry of the event...The first 4 events of the retry until the "After 2 minutes" were pointing to the local Ngrok endpoint which were supposed to fail (described in point 2 above) and I switched it over to the CF worker endpoint after testing with Postman before it hit the "After 10 minutes" retry mark. I have even waited until over an hour to see if I get any logs on my CF worker (success or failure)...No logs.

The conclusion that I'm at is the Kinde is sending Webhook event but it does not work with CloudFlare Workers ?
Was this page helpful?