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 {