I want to validate if the webhook was indeed from Appwrite and it works if the payload does not include special UTF-8 characters like ä,ü,ö etc. But when the payload includes these characters the hash/signature is diffrent...
I use C# for validateing the hash... here is the code:
string payload;
using var reader = new StreamReader(context.Request.InputStream, Encoding.UTF8);
payload = await reader.ReadToEndAsync();
string signature = _webHookUrl + payload.Trim();
string hash = Convert.ToBase64String(hMACSHA1.ComputeHash(Encoding.UTF8.GetBytes(signature)));
if (!context.Request?.Headers?.Get("x-appwrite-webhook-signature")?.Equals(hash) ?? true)
{
// Error hash is invalid
return;
}
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...