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