I am working on getting the new eventsub stuff fully integrated with my node bot, and the last part I am having an issue with is verifying the signature. I understand most of what is needed, but I am coming up short on the part about the raw bytes of the request body. I am using nodejs and express and have seen some of the examples @BarryCarlyon has shown for the x-signature, but am not quite sure I follow that for eventsub.
Also shout out to the twitch devs for adding an error message to the event sub after my last problem about using an a non standard port. I forgot to change my callback URL after I setup my new server and was greeted with a nice message that I was using a non standard port and I needed to fix it.
Thanks I will take a look at the git work through the code. Thankfully you use meaningful comments so I should be able to figure it out I am still somewhat new to using middleware in express and that was tripping me up.
Got it all working, your code was a help, though I still don’t fully understand the buf part of the body parser middleware. That is on me though, thanks for the assist.
If you were not using buf (short for buffer), a korean/french/german streamer with a localized display name or title written in French/German etc using u with umlauts, for example ä, ö, ü
Then the content would be encoded different and you would get a different verification result and your generated verficiation won’t match the one Twitch sent