decolua/9router · error
${callbackParams.error_description || callbackParams.error}
Error message
${callbackParams.error_description || callbackParams.error} What it means
Thrown during IFlowService.connect() when the OAuth redirect back to the local callback server carries an `error` query parameter, meaning iFlow's authorization page refused the login instead of issuing a code. The message prefers the standard `error_description` and falls back to the bare `error` code (e.g. access_denied). This is the upstream's own OAuth error, relayed verbatim.
Source
Thrown at src/lib/oauth/services/iflow.js:172
await new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
reject(new Error("Authentication timeout (5 minutes)"));
}, 300000);
const checkInterval = setInterval(() => {
if (callbackParams) {
clearInterval(checkInterval);
clearTimeout(timeout);
resolve();
}
}, 100);
});
close();
if (callbackParams.error) {
throw new Error(callbackParams.error_description || callbackParams.error);
}
if (!callbackParams.code) {
throw new Error("No authorization code received");
}
spinner.start("Exchanging code for tokens...");
// Exchange code for tokens
const tokens = await this.exchangeCode(callbackParams.code, redirectUri);
spinner.text = "Fetching user info...";
// Get user info (includes API key)
const userInfo = await this.getUserInfo(tokens.access_token);
spinner.text = "Saving tokens to server...";
View on GitHub (pinned to 90b52e06ff)
Solutions
- Read the message — it contains iFlow's error_description (e.g. 'user denied access').
- If access_denied, simply re-run connect() and complete the consent screen without canceling.
- If the error mentions client/invalid request, verify IFLOW_CONFIG.clientId and extraParams against current iFlow requirements.
- Clear browser cookies for the iFlow domain and retry — stale SSO sessions can error out.
- Wait and retry if iFlow reports a temporary server-side problem.
Example fix
null
Defensive patterns
Strategy: try-catch
Try / catch
try {
await iflowService.connect();
} catch (err) {
// The thrown message IS the upstream error_description/error code
if (/access_denied|cancel/i.test(err.message)) {
console.log("Login canceled — re-run connect and approve the consent screen.");
} else if (/client|invalid_request/i.test(err.message)) {
console.error("iFlow rejected the client config — verify IFLOW_CONFIG clientId/extraParams.");
} else { throw err; }
} Prevention
- Complete the consent screen without closing or canceling the browser window.
- Keep IFLOW_CONFIG (clientId, extraParams loginMethod/type) current with iFlow's requirements.
- Clear stale iFlow SSO cookies if repeated authorization errors occur.
- Treat the message text as the upstream OAuth error code/description — parse it for the cause.
When it happens
Trigger: The browser redirect lands on http://localhost:<port>/callback?error=...&error_description=... — the user clicked 'cancel'/'deny' on the consent screen, iFlow rejected the client_id or loginMethod, or the session/tenant on iFlow's side failed during login.
Common situations: User canceling the consent screen; wrong or revoked client_id in IFLOW_CONFIG; iFlow account without permission for the requested loginMethod/type extra params; network hiccup mid-login showing iFlow's own error page which then redirects with error.
Related errors
- ${callbackParams.error_description || callbackParams.error}
- ${params.error_description || params.error}
- Failed to list profiles: ${error}
- ${callbackParams.error_description || callbackParams.error}
- Kiro tool input must be a JSON object
AI-assisted analysis of decolua/9router@90b52e06ff (2026-08-30).
Data as JSON: /api/errors/b6c348d6810cb223.
Report an issue: GitHub.