mitchwadair / tesjs

Streamline your Twitch EventSub JavaScript integration with TESjs

Home Page:https://www.tesjs.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[RFE] Resolve on Subscribe After Handshake is Complete

mitchwadair opened this issue · comments

Is your feature request related to a problem? Please describe.
I think it makes more sense to resolve from a subscribe call when the handshake with Twitch has succeeded, currently is just resolves on a successful request (but the subscription is unverified). This would mean that the subscription is active and no errors occurred when Twitch attempts the challenge.

Describe the solution you'd like
Instead of resolving on successful request to Twitch, resolve after a successful challenge handshake. Also possibly make 401/403 errors log above debug level.

Additional context
When implementing TESjs with an existing Express server, sometimes the configuration of the existing server can cause issues when validating a request from Twitch to TESjs. This would catch these errors to make debugging easier.