From 5674cb1d699c7557beffddffa8888c8d0da683b5 Mon Sep 17 00:00:00 2001 From: dee-see Date: Tue, 1 Sep 2026 11:56:41 +0100 Subject: [PATCH] YWH works unauth, allow it on the CLI --- cmd/poll_ywh.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/poll_ywh.go b/cmd/poll_ywh.go index 723f72f..3977010 100644 --- a/cmd/poll_ywh.go +++ b/cmd/poll_ywh.go @@ -22,9 +22,12 @@ var pollYwhCmd = &cobra.Command{ if proxy != "" { whttp.SetupProxy(proxy) } - // Validate auth: require either token OR (email+password+otp-secret) - if token == "" && (email == "" || password == "" || otpSecret == "") { - utils.Log.Error("yeswehack requires either token or email+password+otp-secret") + // Auth is optional: the public API serves public programs unauthenticated. + // A token or email+password+otp-secret is only needed for private programs. + if token == "" && email == "" && password == "" && otpSecret == "" { + utils.Log.Info("No YesWeHack credentials provided; polling public programs unauthenticated") + } else if token == "" && (email == "" || password == "" || otpSecret == "") { + utils.Log.Error("yeswehack authenticated mode requires either token or email+password+otp-secret") return nil }