mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-25 02:08:21 +00:00
Preserve current behaviour with a config flag
Add a configuration flag (default true to preserve current behaviour) to allow headscale to start without OIDC being able to initialise. Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
4
app.go
4
app.go
@@ -192,7 +192,9 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
|
||||
|
||||
if cfg.OIDC.Issuer != "" {
|
||||
err = app.initOIDC()
|
||||
if err != nil {
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user