From 91892cec4c908820d298d56a0e8dfd421522daf8 Mon Sep 17 00:00:00 2001 From: Maciej Golaszewski Date: Mon, 11 May 2026 17:19:24 +0200 Subject: [PATCH] Fix authentication URL port handling --- cmd/engflow_auth/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/engflow_auth/main.go b/cmd/engflow_auth/main.go index 65d3b8e..d9ad84c 100644 --- a/cmd/engflow_auth/main.go +++ b/cmd/engflow_auth/main.go @@ -289,6 +289,9 @@ Visit %s for help.`, if err != nil { return autherr.CodedErrorf(autherr.CodeAuthFailure, "failed to parse authentication URL: %w", err) } + if clusterPort := clusterURL.Port(); clusterPort != "" && verificationURL.Port() == "" { + verificationURL.Host = net.JoinHostPort(verificationURL.Hostname(), clusterPort) + } if err := r.browserOpener.Open(verificationURL); err != nil { return autherr.CodedErrorf(autherr.CodeAuthFailure, "failed to open browser to perform authentication: %w", err) }