Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature request: "--browser" flag for "cf login"

Đang mở
#1,898 5 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@a-b đang làm issue này rồi.

Từ ngày 1/10/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

product-improvement

Context

Single sign-on flow is fragile depending on terminal emulator used by user.

Some users, running cf login --sso are given a link, which is copy-and-pasteable into a web browser; more commonly, users use their terminal emulator to click the link. This link can sometimes be truncated to domain.suffix/pa or passcod, etc due to line-wrapping, or other issues.

These problems are to do with the terminal emulator, and so are not fixable by CF CLI, however the CLI could provide more ergonomic ways for getting a passcode.

Concourse's CLI fly has a --browser / -b flag which performs the flow automatically, by opening the browser which, in turn, redirects the user to a local port. This may be overkill however.

I propose either implementing the --browser flag via Fly, or alternatively provider an --open-browser flag which opens the passcode URL, obviating the need for a user to copy/paste the link.

The --sso-passcode flag is useful, but does not solve the problem described.

What's the user value of this feature request?

Operators of Cloud Foundry would be able to document a less fragile way of signing in, either by using the --browser flow or the --open-browser flag to automatically link users to the correct page.

Who is the functionality for?

This could be used by any user who uses single sign-on to log in.

How often will this functionality be used by the user?

Whenever the user logs in.

Who else is affected by the change?

This would be a non-breaking change

Is your feature request related to a problem? Please describe.

Users semi-regularly report that SSO is not working, because their terminal emulator does not play nicely with CF CLI output.

Describe the solution you'd like

One of, depending on preferences of product management:

As a user, I want to be able to run cf login --sso --browser which automatically conducts the browser login flow, with a local redirection, so that I don't have to copy and paste.

As a user, I want to be able to run cf login --sso --open-browser which automatically opens the passcode page in my browser, so that copy-and-pasting the link is more ergonomic, and less fragile

Describe alternatives you've considered

Writing a CF Plugin instead

Ngôn ngữ chính
Go
Star
1.9k
Fork
989
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudfoundry/cli

Tất cả issue của cloudfoundry/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.