Stripe | BetterAuth webhooks in Cloudflare need to be async error (FIXED)

Using BetterAuth on CloudFlare Pages (with Sveltekit in my case) brings this error when trying to use the Webhooks from Stripe (Based on the Docs):
"WEBHOOK_ERROR_SUBTLECRYPTOPROVIDER_CANNOT_BE_USED_IN_A_SYNCHRONOUS_CONTEXTUSE_AWAIT_CONSTRUCTEVENTASYNC_INSTEAD_OF_CONSTRUCTEVENT",
"message": 
"Webhook Error: SubtleCryptoProvider cannot be used in a synchronous context. Use `await constructEventAsync(...)` instead of `constructEvent(...)`",

The question is, if every environment supports Async or if you now need to decide if it should be async or sync based on the environment.
Solution
Fixed by newest update 1.2.4
Was this page helpful?