From fb7e6502675c79ffd3e4b97e9026f86321adc9c2 Mon Sep 17 00:00:00 2001 From: jamesread Date: Mon, 14 Oct 2024 02:21:21 +0100 Subject: [PATCH] feature: OAuth2 Redirect URL --- internal/config/config.go | 1 + internal/httpservers/oauth2.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/config/config.go b/internal/config/config.go index b523a7f..e4a51d2 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -117,6 +117,7 @@ type Config struct { AuthHttpHeaderUserGroup string AuthLoginUrl string AuthAllowGuest bool + AuthOAuth2RedirectURL string AuthOAuth2Providers map[string]*OAuth2Provider DefaultPermissions PermissionsList AccessControlLists []*AccessControlList diff --git a/internal/httpservers/oauth2.go b/internal/httpservers/oauth2.go index d934fe4..b2e4a0d 100644 --- a/internal/httpservers/oauth2.go +++ b/internal/httpservers/oauth2.go @@ -69,7 +69,7 @@ func getOAuth2Config(cfg *config.Config, providerName string) (*oauth2.Config, e AuthURL: providerConfig.AuthUrl, TokenURL: providerConfig.TokenUrl, }, - RedirectURL: "http://localhost:1337/oauth/callback", + RedirectURL: cfg.AuthOAuth2RedirectURL, } registeredProviders[providerName] = config