-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update buf registry login to use browser by default #3167
Conversation
Updates the command `buf registry login` to use the brower login flow. Users will be prompted to complete the flow in the browser authorizing the device and providing it an access token.
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the workflow on Windows, in Powershell, and it does not seem to behave as intended, instead of getting the browser open, it opened a new Command Prompt window, and then when I went to the link directly, an error occurred.
private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go
Outdated
Show resolved
Hide resolved
private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go
Outdated
Show resolved
Hide resolved
private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go
Outdated
Show resolved
Hide resolved
var ( | ||
// ErrUnsupported is returned when we receive an unsupported response from the server. | ||
// | ||
// TODO(go1.21): replace by errors.ErrUnsupported once it is available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this PR is merged, make sure to merge main into #3123 and delete this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this FYI
Updates the command
buf registry login
to use the brower login flow. On login, the users browser will be opened prompting the user to approve or deny access to the device. This simplifies the login flow avoiding the steps previously required to create an access token before providing it to the CLI.The flag
--no-browser
may be provided to disable the browser flow and prompt the user for the access token. The flag--token-stdin
behaviour remains the same as before. Providing both flags is an error.