New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(auth): accept equivalencies when comparing scopes #343
fix(auth): accept equivalencies when comparing scopes #343
Conversation
Could this be used to fix #323 too? (user:edit:broadcast -> channel:manage:broadcast) |
Yes, but extra care would be needed to not accept the reverse (for example in helix Edit: depending on what scope validation the chat package does, the reverse mappings could be eliminated Edit2: looks like there's already a |
Indeed, chat has to do a very strict validation here, since the required scope depends entirely on when the application was created on the Twitch dev portal. From my tests back when the change was introduced, "new" apps don't support the "old" scopes and vice versa. |
Type: Bugfix
Fixes #342
Fixes #323
Closes #335
compareScopes
from anO(n*m)
operation toO(n+m)
compareScopes
user:edit:broadcast
forchannel:manage:broadcast
incompareScopes
channel_subscriptions
=>channel:read:subscriptions
forchannel-subscribe-events-v1
user:edit:broadcast
=>channel:manage:broadcast
forupdateChannelInfo
,createStreamMarker
, andreplaceStreamTags