Skip to content

Commit

Permalink
Fix warning on success
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowJonathan authored Sep 27, 2022
1 parent 5fe6538 commit 70ecda6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,12 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {

if cfg.OIDC.Issuer != "" {
err = app.initOIDC()
if err != nil && cfg.OIDC.OnlyStartIfOIDCIsAvailable {
return nil, err
} else {
log.Warn().Err(err).Msg("failed to set up OIDC provider, falling back to CLI based authentication")
if err != nil {
if cfg.OIDC.OnlyStartIfOIDCIsAvailable {
return nil, err
} else {
log.Warn().Err(err).Msg("failed to set up OIDC provider, falling back to CLI based authentication")
}
}
}

Expand Down

0 comments on commit 70ecda6

Please sign in to comment.