Kuberwastaken/claurst · error
Authentication timed out after 120 seconds
Error message
Authentication timed out after 120 seconds
What it means
The OAuth login flow waited 120 seconds without receiving an authorization code, via either the loopback callback or the manual paste channel. The tokio::select! deadline expired — the user never completed (or the browser never delivered) the consent step in time.
Solutions
- Restart the login and complete the browser consent promptly within the 2-minute window
- Use the manual paste fallback: copy the code from the success page into the TUI
- Check that the browser can reach 127.0.0.1 for the loopback redirect (no proxy blocking)
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src-rust/crates/cli/src/oauth_flow.rs:542 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of Kuberwastaken/claurst@b0637c97ec (2026-09-10).
Data as JSON: /api/errors/a3c2a3b2a5dec69c.
Report an issue: GitHub.
Appendix: source
Thrown at src-rust/crates/cli/src/oauth_flow.rs:542
});
tokio::select! {
result = cb_rx => {
// Loopback callback: code came clean from the query string and was
// authorized against the localhost redirect_uri.
result
.unwrap_or_else(|_| Err(anyhow::anyhow!("Callback server dropped")))
.map(|code| (code, false))
}
code = paste_rx => {
// Manual paste: the page hands back "<code>#<state>"; keep only the
// code part. This path authorized against MANUAL_REDIRECT_URL.
let raw = code.map_err(|_| anyhow::anyhow!("Stdin closed unexpectedly"))?;
let code_only = raw.split('#').next().unwrap_or(&raw).trim().to_string();
Ok((code_only, true))
}
_ = tokio::time::sleep(Duration::from_secs(120)) => {
bail!("Authentication timed out after 120 seconds")
}
}
}
View on GitHub (pinned to b0637c97ec)