feature: OAuth2 Redirect URL

This commit is contained in:
jamesread 2024-10-14 02:21:21 +01:00 committed by James Read
parent 6a7187fb5b
commit fb7e650267
2 changed files with 2 additions and 1 deletions

View File

@ -117,6 +117,7 @@ type Config struct {
AuthHttpHeaderUserGroup string
AuthLoginUrl string
AuthAllowGuest bool
AuthOAuth2RedirectURL string
AuthOAuth2Providers map[string]*OAuth2Provider
DefaultPermissions PermissionsList
AccessControlLists []*AccessControlList

View File

@ -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