Explorar o código

fix: log warning on an empty client secret

Because Miniflux runs as a confidential service, a missing client secret
is a mistake in configuration. An empty client secret appears to be
valid per RFC 6749 (and is in fact the default set by Miniflux!), so we
log a warning.
Tali Auster hai 1 ano
pai
achega
b3d385861f
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      internal/oauth2/manager.go

+ 4 - 0
internal/oauth2/manager.go

@@ -39,5 +39,9 @@ func NewManager(ctx context.Context, clientID, clientSecret, redirectURL, oidcDi
 		}
 		}
 	}
 	}
 
 
+	if clientSecret == "" {
+		slog.Warn("OIDC client secret is empty or missing.")
+	}
+
 	return m
 	return m
 }
 }