docs(cli): spice login bounds the browser wait and keeps credentials on-origin - #2072
Open
lukekim wants to merge 1 commit into
Open
docs(cli): spice login bounds the browser wait and keeps credentials on-origin#2072lukekim wants to merge 1 commit into
lukekim wants to merge 1 commit into
Conversation
Contributor
✅ Pull with Spice PassedPassing checks:
|
Contributor
|
🚀 deployed to https://79c8aea9.spiceai-org-website.pages.dev |
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
Four merged runtime PRs changed how
spice loginhandles the browser flow and its credentials, and none of it was documented — the page described only "opens a browser".spiceai/spiceai#12523). It previously had no deadline and no attempt bound: an unreachable or wrongSPICE_BASE_URL, a persistent 4xx, or an HTML error page re-looped once a second forever andspice loginnever exited on its own.404is retryable, not fatal (spiceai/spiceai#12871, a follow-up to the above). The auth code is minted locally, so the exchange answers404until the browser authorization exists — including on the first poll. The deadline still bounds an endpoint that answers404forever.spiceai/spiceai#12503,spiceai/spiceai#12508). The auth code, device code, and access token travel in the request body, which a307/308replays verbatim to the redirect target, so header stripping alone is not enough and the hop itself is refused.Changes
website/docs/cli/reference/login.mdgains two sections underspice login:Authentication timed out. Please try again.message, which outcomes stop immediately (Access denied;400/401/403/410), and which keep polling (5xx,408,429, network failures, and404). Notes thatspice cloud login subscriptionshares the same 5-minute deadline.307/308case is the one that matters, that it covers thespice loginflows, the Spice Cloud client, and the CLI's own--api-keyrequests, and that a refused hop surfaces as the3xxrather than as a transport error.Verified against
origin/trunkrather than the merged diffs, which matters here —#12871reclassified an outcome#12523had introduced days earlier, so the merged#12523diff alone would have shipped a wrong statement about404. Sources:LOGIN_POLL_TIMEOUT/LOGIN_POLL_INTERVAL,classify_exchange_status,classify_exchange_body,poll_for_access_token, andcredentialed_client()inbin/spice/src/commands/login/mod.rs;same_origin_redirect_policy()incrates/spice-cloud-client/src/redirect.rs, applied atbin/spice/src/context.rs:107,crates/spice-cloud-client/src/client.rs:52, andbin/spice/src/commands/login/mod.rs:486; the cloud device flow's 5-minute deadline atbin/spice/src/commands/cloud/mod.rs:2020. Every quoted message string was grepped in source, not paraphrased.Source PRs
Versioned-docs propagation
Addition — vNext only. All four commits post-date
v2.1.4(tagged 2026-08-05) andgit tag --containsis empty for each, so no versioned snapshot describes this behavior.Test plan
cd website && npm run buildpasses (Docusaurus throws on broken links / undefined tags)