From 110786980d40ce2d8597103ed0f3b0def11ec352 Mon Sep 17 00:00:00 2001 From: Matheus Nogueira Date: Wed, 28 Aug 2024 14:08:39 -0300 Subject: [PATCH] fix: append callback parameter after joining url path --- cli/pkg/oauth/oauth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/pkg/oauth/oauth.go b/cli/pkg/oauth/oauth.go index 4e5fb7f5a3..402c51859a 100644 --- a/cli/pkg/oauth/oauth.go +++ b/cli/pkg/oauth/oauth.go @@ -59,11 +59,13 @@ func (s *OAuthServer) GetAuthJWT() error { return fmt.Errorf("failed to start oauth server: %w", err) } - loginUrl, err := neturl.JoinPath(s.frontendEndpoint, fmt.Sprintf("oauth?callback=%s", url)) + loginUrl, err := neturl.JoinPath(s.frontendEndpoint, "oauth") if err != nil { return fmt.Errorf("could not build path: %w", err) } + loginUrl += fmt.Sprintf("?callback=%s", url) + ui := ui.DefaultUI err = ui.OpenBrowser(loginUrl) if err != nil {