Skip to content

Commit

Permalink
fix scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
gempir committed Feb 17, 2024
1 parent 548665d commit e2200f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/helixclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion web/src/factory/createLoginUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit e2200f2

Please sign in to comment.