Hello everyone, I would like to know what would be the best approach to enable the following requirements:
follower user gets the right to interact in the extension 1x per round.
user subscribed to the channel receives the right to interact in the extension 3x.
the extension is this: https://www.twitch.tv/ext/hecb122wgtrzumrv9ywwjn7wg6nglq-0.0.3
I need to do this check always before the viewer chooses a location on the map.
Using purely the JS helper you will be able to look up follower status as the helper provides the channelID you are on. And if the user has linked their TwitchID their TwitchID. The followers API endpoint only requires a ClientID/ExtensionID to perform a check
To check the status of a subscription. You have channelID and userID as before but on the front end you cannot request the additional oAuth scopes from the user.
But you can in the config panel collect scopes and thus a oAuth token from the broadcaster.
That oAuth token also needs to remain secret. So that check would be performed on the EBS, secured via JWT auth.
It would be performant to have the user link their twitch ID in the extension, send the whole JWT to your EBS and perform both the public follower check (just ClientID/EXTID) and the private subscriber check (with broadcaster token) there and return a single payload to the front end.
very interesting idea of identifying the followers, I think I’ll just abort who is follower for now, seems to be something simpler to do at first, thanks for the tips!