From efefe08582c4867496eb18b97da6c49f0bc453b9 Mon Sep 17 00:00:00 2001 From: sugoidogo Date: Sun, 26 Jan 2025 12:05:14 +0000 Subject: [PATCH] better url parsing --- static/TwitchAuth.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/TwitchAuth.mjs b/static/TwitchAuth.mjs index ce605d7..0a7b869 100644 --- a/static/TwitchAuth.mjs +++ b/static/TwitchAuth.mjs @@ -20,7 +20,7 @@ const fetch = fetch_retry(globalThis.fetch, { retries: 10, retryDelay: attempts * @property {String} scope */ -const redirect_uri = location.href.split('?')[0] +const redirect_uri = location.origin+location.pathname const proxy_uri = new URL('/oauth2/token', import.meta.url) /**