From 6bf3ec884be6563ae02101acb438abebf7b5e1c5 Mon Sep 17 00:00:00 2001 From: Matt Etress Date: Fri, 2 Aug 2024 17:59:52 -0500 Subject: [PATCH] Construct redirect uri dynamically --- src/views/GoTV/useTwitchIntegration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/GoTV/useTwitchIntegration.ts b/src/views/GoTV/useTwitchIntegration.ts index 2f42bee2c3..85a47a4582 100644 --- a/src/views/GoTV/useTwitchIntegration.ts +++ b/src/views/GoTV/useTwitchIntegration.ts @@ -21,7 +21,7 @@ import { usePreference } from "preferences"; // Client ID will need to be the OGS client ID, probably from environment variable? // Redirect URI also needs to match the allowed redirect URIs in the console at dev.twitch.tv const TWITCH_CLIENT_ID = "z00yx3qzdzkh10c6nxku6tqm1pxrgv"; // cspell:disable-line -const REDIRECT_URI = "http://localhost:8080/settings/gotv"; +const REDIRECT_URI = `${window.location.protocol}//${window.location.host}/settings/gotv`; export interface FollowedChannel { broadcaster_id: string;