diff --git a/internal/cli/cli.go b/internal/cli/cli.go index d2b6ae755e2..e0c85d05a49 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -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)