mirror of
https://github.com/jwadow/kiro-gateway.git
synced 2026-04-25 01:15:57 +03:00
[PR #17] [CLOSED] fix(auth): reload SQLite credentials before token refresh #56
Labels
No labels
bug
bug
enhancement
enhancement
fixed
fixed
invalid
needs-info
needs-testing
pull-request
question
upstream
wontfix
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kiro-gateway-jwadow#56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jwadow/kiro-gateway/pull/17
Author: @bhaskoro-muthohar
Created: 1/7/2026
Status: ❌ Closed
Base:
main← Head:fix/reload-sqlite-credentials-on-refresh📝 Commits (2)
345a585fix(auth): reload SQLite credentials before token refresheaa07e8fix(auth): use JSON body with camelCase for AWS SSO OIDC refresh📊 Changes
2 files changed (+34 additions, -36 deletions)
View changed files
📝
kiro_gateway/auth.py(+11 -13)📝
tests/unit/test_auth_manager.py(+23 -23)📄 Description
Problem
When using AWS SSO OIDC with kiro-cli, the gateway caches credentials at startup. If the user re-logs in via kiro-cli (e.g., after SSO token expiration), the new
refresh_tokenis written to SQLite but the gateway keeps using the stale cached token, causing authentication failures.This requires manually restarting the gateway after every kiro-cli re-login, which is inconvenient.
Solution
Re-read credentials from SQLite before attempting a token refresh in
_refresh_token_aws_sso_oidc(). This ensures the gateway picks up fresh tokens after kiro-cli re-login without requiring a restart.Changes
_refresh_token_aws_sso_oidc()to reload credentials from SQLite before refreshTesting
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.