From 868b57cd1128cea1cbc5bbaa669e384c689ccde4 Mon Sep 17 00:00:00 2001 From: sugoidogo Date: Sat, 8 Feb 2025 18:29:56 +0000 Subject: [PATCH] trim scope string --- static/TwitchAuth.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/TwitchAuth.mjs b/static/TwitchAuth.mjs index 1345170..6761630 100644 --- a/static/TwitchAuth.mjs +++ b/static/TwitchAuth.mjs @@ -85,7 +85,7 @@ export function requestAuthCode(client_id, ...scopes) { const url = new URL('https://id.twitch.tv/oauth2/authorize') url.searchParams.append('response_type', 'code') url.searchParams.append('client_id', client_id) - url.searchParams.append('scope', scopes.join(' ')) + url.searchParams.append('scope', scopes.join(' ').trim()) location.assign(url + '&redirect_uri=' + redirect_uri) return new Promise(()=>{}) }