diff --git a/internal/helixclient/client.go b/internal/helixclient/client.go index 1b908ec..c0e70ec 100644 --- a/internal/helixclient/client.go +++ b/internal/helixclient/client.go @@ -66,7 +66,7 @@ func init() { const TWITCH_API = "https://api.twitch.tv/" -var scopes = []string{"channel:read:redemptions", "channel:manage:redemptions", "channel:read:predictions", "channel:manage:predictions moderation:read channel:bot user:write:chat user:bot moderator:manage:announcements"} +var scopes = []string{"channel:read:redemptions", "channel:manage:redemptions", "channel:read:predictions", "channel:manage:predictions", "moderation:read", "channel:bot", "user:write:chat", "user:bot", "moderator:manage:announcements"} // NewClient Create helix client func NewClient(cfg *config.Config, db store.Store) *HelixClient { diff --git a/web/src/factory/createLoginUrl.ts b/web/src/factory/createLoginUrl.ts index f30cd00..f3f164d 100644 --- a/web/src/factory/createLoginUrl.ts +++ b/web/src/factory/createLoginUrl.ts @@ -3,7 +3,7 @@ export function createLoginUrl(apiBaseUrl: string, twitchClientId: string): URL url.searchParams.set("client_id", twitchClientId); url.searchParams.set("redirect_uri", apiBaseUrl + "/api/callback"); url.searchParams.set("response_type", "code"); - url.searchParams.set("scope", "channel:read:redemptions channel:manage:redemptions channel:read:predictions channel:manage:predictions moderation:read channel:bot user:write:chat user:bot moderator:manage:announcements"); + url.searchParams.set("scope", ["channel:read:redemptions", "channel:manage:redemptions", "channel:read:predictions", "channel:manage:predictions", "moderation:read", "channel:bot", "user:write:chat", "user:bot", "moderator:manage:announcements"].join(" ")); return url; } \ No newline at end of file