fix(auth): clearer guidance when edge-auth browser login times out#2233
Closed
mvanhorn wants to merge 1 commit into
Closed
fix(auth): clearer guidance when edge-auth browser login times out#2233mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
When the Cloudflare Access edge-auth browser flow times out, the CLI now explains that the gateway uses a Cloudflare Access edge-auth flow and points to the concrete next steps -- re-register with an OIDC issuer, or use --local for a gateway provisioned with local mTLS certs -- instead of a bare timeout error. Threads the gateway name and existing-registration state into browser_auth_flow so the message can name the exact remove/re-add commands. Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
mvanhorn
requested review from
a team,
derekwaynecarr,
maxamillion and
mrunalp
as code owners
July 12, 2026 13:01
|
Thank you for your interest in contributing to OpenShell, @mvanhorn. This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer. To get vouched:
See CONTRIBUTING.md for details. |
|
Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text: I have read the DCO document and I hereby sign the DCO. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the Cloudflare Access edge-auth browser login timed out, the CLI printed a bare "authentication timed out" error with no indication of what went wrong or what to do next. On deployments that are not fronted by Cloudflare Access, the browser flow can never complete, so users hit the timeout with no path forward. This turns that dead end into actionable guidance that names the flow and the exact commands to fix the registration.
Related Issue
Closes #2099
Changes
On a timeout, the CLI now explains that the attempted login uses a Cloudflare Access edge-auth flow, and it tells the user how to proceed: re-register the gateway against its OIDC issuer, or use the local mTLS certificate mode when the gateway was provisioned that way. When a registration already exists it also names the remove step first, since the mode cannot be changed in place. To let the message reference the exact gateway by name, the auth flow now receives the gateway name and whether a registration already exists.
Testing
The auth crate's test suite passes locally. The change is a user-facing error message, so its behavior is exercised through the existing auth path rather than a new assertion.
cargo test -p openshell-cli authpasses.mise run pre-commitpasses (not run in this environment).Checklist
AI was used for assistance.