make redirect url configurable

This commit is contained in:
Martin Thielecke 2020-05-09 22:39:27 +02:00
parent 0cd4efc8d8
commit 27e17bd82e
Signed by: mthie
GPG Key ID: D1D25A85C8604DFB
2 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@ var (
type Settings struct {
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
RedirectURL string `yaml:"redirect_Url"`
VerificationToken string `yaml:"verification_token"`
WebserverPort string `yaml:"webserver_port"`
}
@ -40,7 +41,7 @@ func loadSettings() {
settings = s
twitchOauthConfig = &oauth2.Config{
RedirectURL: "http://localhost:8080/callback",
RedirectURL: settings.RedirectURL,
ClientID: settings.ClientID,
ClientSecret: settings.ClientSecret,
Scopes: []string{"channel:read:subscriptions", "user:read:broadcast", "chat:read", "chat:edit", "channel_read", "channel_editor", "channel_subscriptions", "channel:moderate", "bits:read", "channel:read:redemptions"},

View File

@ -2,3 +2,4 @@ client_id: "your twitch client id"
client_secret: "your twitch client secret"
verification_token: "a random string!"
webserver_port: 8080
redirect_url: "http://localhost:8080/callback",