From acdc3cb8d4f922e69f1950e1c10bfe0b9d052061 Mon Sep 17 00:00:00 2001 From: Frederico Santos Date: Sat, 27 Jul 2024 03:10:14 +0100 Subject: [PATCH] Update callback URL for Oauth2 client in docker-compose and rogueserver.go --- docker-compose.Example.yml | 2 +- rogueserver.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.Example.yml b/docker-compose.Example.yml index 1c74bc6..3eee682 100644 --- a/docker-compose.Example.yml +++ b/docker-compose.Example.yml @@ -1,6 +1,6 @@ services: server: - command: --debug --dbaddr db --dbuser pokerogue --dbpass pokerogue --dbname pokeroguedb --gameurl http://localhost:8000 --callbackuri http://localhost:8001 + command: --debug --dbaddr db --dbuser pokerogue --dbpass pokerogue --dbname pokeroguedb --gameurl http://localhost:8000 --callbackurl http://localhost:8001 image: ghcr.io/pagefaultgames/rogueserver:master restart: unless-stopped depends_on: diff --git a/rogueserver.go b/rogueserver.go index f62bb1d..debc265 100644 --- a/rogueserver.go +++ b/rogueserver.go @@ -49,7 +49,7 @@ func main() { googleclientid := flag.String("googleclientid", "gcid", "Google Oauth2 Client ID") googlesecretid := flag.String("googlesecretid", "gsid", "Google Oauth2 Secret ID") - callbackuri := flag.String("callbackuri", "http://localhost:8001/", "Callback URI for Oauth2 Client") + callbackurl := flag.String("callbackurl", "http://localhost:8001/", "Callback URI for Oauth2 Client") gameurl := flag.String("gameurl", "https://pokerogue.net", "URL for game server") @@ -58,11 +58,11 @@ func main() { // set discord client id as env variable os.Setenv("DISCORD_CLIENT_ID", *discordclientid) os.Setenv("DISCORD_CLIENT_SECRET", *discordsecretid) - os.Setenv("DISCORD_CALLBACK_URI", *callbackuri+"/auth/discord/callback") + os.Setenv("DISCORD_CALLBACK_URI", *callbackurl+"/auth/discord/callback") os.Setenv("GOOGLE_CLIENT_ID", *googleclientid) os.Setenv("GOOGLE_CLIENT_SECRET", *googlesecretid) - os.Setenv("GOOGLE_CALLBACK_URI", *callbackuri+"/auth/google/callback") + os.Setenv("GOOGLE_CALLBACK_URI", *callbackurl+"/auth/google/callback") os.Setenv("GAME_URL", *gameurl) // register gob types