Skip to content

fix: show quota auth expired message for Kiro social auth accounts (closes #588) - #620

Merged
decolua merged 2 commits into
decolua:masterfrom
anuragg-saxenaa:fix/issue-588-kiro-quota-social-auth
Apr 17, 2026
Merged

decolua merged 2 commits into
decolua:masterfrom
anuragg-saxenaa:fix/issue-588-kiro-quota-social-auth

Conversation

@anuragg-saxenaa

Copy link
Copy Markdown
Contributor

Summary

When adding a new Kiro account via Google/GitHub social auth, the usage page showed a generic message instead of the specific auth expired message.

Root Cause

getKiroUsage handled authMethod idc specifically but had no specific handling for Google/GitHub social auth. Both trigger sawAuthError but social auth fell through to the generic fallback.

Fix

Added a specific condition for social auth authMethod google or github that returns the same message users with old accounts see: Kiro quota API authentication expired. Chat may still work.

Closes #588

@decolua
decolua merged commit 2e8784c into decolua:master Apr 17, 2026
idbara pushed a commit to idbara/9router that referenced this pull request Apr 23, 2026
…loses decolua#588) (decolua#620)

* fix: add multi-model support for Factory Droid CLI tool (closes decolua#521)

* fix: show quota auth expired message for Kiro social auth accounts (closes decolua#588)
luckystart79-lang pushed a commit to luckystart79-lang/minirouter that referenced this pull request May 2, 2026
…loses decolua#588) (decolua#620)

* fix: add multi-model support for Factory Droid CLI tool (closes decolua#521)

* fix: show quota auth expired message for Kiro social auth accounts (closes decolua#588)
caothu159 pushed a commit to diepxuan/9router that referenced this pull request May 14, 2026
…loses decolua#588) (decolua#620)

* fix: add multi-model support for Factory Droid CLI tool (closes decolua#521)

* fix: show quota auth expired message for Kiro social auth accounts (closes decolua#588)
diegosouzapw pushed a commit to diegosouzapw/OmniRoute that referenced this pull request Jun 21, 2026
…ccounts

A Kiro connection added via /api/oauth/kiro/social-exchange (Google or
GitHub social-login device flow) carries a token format that AWS
CodeWhisperer's GetUsageLimits API routinely rejects with 401/403 even
when /messages still works. The quota card was throwing the raw upstream
error blob ("Failed to fetch Kiro usage: Kiro API error (401): {...}"),
which is noisy and unhelpful.

getKiroUsage now detects the social-auth carveout from providerSpecificData
({ authMethod: "imported", provider: "Google" | "Github" } — exactly what
social-exchange/route.ts persists) and returns the same friendly
"Kiro quota API authentication expired. Chat may still work." message
that legacy social-auth users already see. Builder-ID / IDC / kiro-cli
imports keep the existing throw-on-failure behavior so transient upstream
errors don't get silently masked.

TDD: kiro-iam-profilearn-usage.test.ts gets two new cases — the social-auth
path resolves to the friendly message (RED before the fix), and the
non-social Builder-ID path still throws on 401/403 (guards against the
fix overreaching).

Inspired-by: decolua/9router#620
Co-authored-by: Anurag Saxena <anuragg.saxenaa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tài khoản Kiro mới hiển thị Quota hết hạn

2 participants