You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a followup to #164, there should be a way to use Helix endpoints that require JWTs in a Twitch Extension backend service (EBS).
Features:
Get Extension
Create Extension Secret
Get Extension Secret
Set Extension Required Configuration
Set Extension Configuration Segment
Get Extension Configuration Segment
Send Extension PubSub Message
Send Extension Chat Message
This would probably require the introduction of a new AuthProvider that handles "external" JWTs transparently.
Additionally, the PubSub Message endpoint supports sending with a user JWT directly.
The text was updated successfully, but these errors were encountered:
I feel like this is a thing that completely differs from the use case of the ApiClient. The authentication isn't something that requires to be "managed" in an AuthProvider. These APIs can not be called using a normal OAuth token, and no other APIs can be called with JWTs. I could generate and sign a new short-lived JWT every single time the user wants to call one of these endpoints, really.
My idea on this is: rather than creating new methods on the ApiClient or creating a new class, there could be a new package basically just featuring a few free-standing functions (kinda like the @twurple/auth helpers functions). They would only depend on @twurple/api-call (the more bare-bones version of ApiClient) and some JWT library. Each function (in addition to its required endpoint parameters) would take an object that includes all required info to create the JWT (secret, owner ID, optionally JWT expiry, defaulting to 60 seconds or something like that). We can then easily throw our requests with a JWT to the Helix API. (Bikeshedding proposal: @twurple/ebs-helper)
I'm not sure whether people would still expect these things to be on ApiClient, but I feel like they might be better off outside of it.
This feature will be implemented close to this "spec".
Feature Request
As a followup to #164, there should be a way to use Helix endpoints that require JWTs in a Twitch Extension backend service (EBS).
Features:
This would probably require the introduction of a new AuthProvider that handles "external" JWTs transparently.
Additionally, the PubSub Message endpoint supports sending with a user JWT directly.
The text was updated successfully, but these errors were encountered: