Skip to content

Commit

Permalink
Allow disabling local auth if AUTH_PROXY_HEADER is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
thefinn93 committed Aug 3, 2024
1 parent cebd07c commit f1d694f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ func Parse() {
return
}

if config.Opts.DisableLocalAuth() && config.Opts.OAuth2Provider() == "" {
printErrorAndExit(errors.New("DISABLE_LOCAL_AUTH is enabled but OAUTH2_PROVIDER is not set. Please enable at least one authentication source"))
if config.Opts.DisableLocalAuth() && config.Opts.OAuth2Provider() == "" && config.Opts.AuthProxyHeader() == "" {
printErrorAndExit(errors.New("DISABLE_LOCAL_AUTH is enabled but neither OAUTH2_PROVIDER nor AUTH_PROXY_HEADER is not set. Please enable at least one authentication source"))
}

startDaemon(store)
Expand Down

0 comments on commit f1d694f

Please sign in to comment.