From a1de20e9710f52d9cc19a4dce862a9494f3f56a8 Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Tue, 14 Apr 2026 13:10:28 +0800 Subject: [PATCH] fix(cli): fix Windows login requiring two attempts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows, `cmd /c start ` treats `&` in the URL as a shell command separator, truncating the login URL at the first `&cli_state=` parameter. This causes the OAuth state validation to fail silently, requiring users to login a second time. Adding an empty title argument (`""`) before the URL is the standard Windows fix — `start` interprets the first quoted argument as a window title, so without it, URLs containing special characters get mangled. --- server/cmd/multica/cmd_auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cmd/multica/cmd_auth.go b/server/cmd/multica/cmd_auth.go index 52f869943..b02f94618 100644 --- a/server/cmd/multica/cmd_auth.go +++ b/server/cmd/multica/cmd_auth.go @@ -79,7 +79,7 @@ func openBrowser(url string) error { args = []string{url} case "windows": cmd = "cmd" - args = []string{"/c", "start", url} + args = []string{"/c", "start", "", url} default: return fmt.Errorf("unsupported platform: %s", runtime.GOOS) }