trim scope string

This commit is contained in:
2025-02-08 18:29:56 +00:00
parent e2adb054a1
commit 868b57cd11
+1 -1
View File
@@ -85,7 +85,7 @@ export function requestAuthCode(client_id, ...scopes) {
const url = new URL('https://id.twitch.tv/oauth2/authorize') const url = new URL('https://id.twitch.tv/oauth2/authorize')
url.searchParams.append('response_type', 'code') url.searchParams.append('response_type', 'code')
url.searchParams.append('client_id', client_id) 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) location.assign(url + '&redirect_uri=' + redirect_uri)
return new Promise(()=>{}) return new Promise(()=>{})
} }