From b8652b7387d50e1ca1459f1bc08f31735ab66698 Mon Sep 17 00:00:00 2001 From: CheesesNguyen Date: Wed, 28 Jan 2026 14:54:58 +0700 Subject: [PATCH] feat: normalize authentication method to lowercase for case-insensitive matching during token refresh and introduce new CLIProxyAPIPlus component. --- internal/auth/kiro/background_refresh.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/auth/kiro/background_refresh.go b/internal/auth/kiro/background_refresh.go index 2b4a161c..d64c7475 100644 --- a/internal/auth/kiro/background_refresh.go +++ b/internal/auth/kiro/background_refresh.go @@ -161,9 +161,12 @@ func (r *BackgroundRefresher) refreshBatch(ctx context.Context) { } func (r *BackgroundRefresher) refreshSingle(ctx context.Context, token *Token) { + // Normalize auth method to lowercase for case-insensitive matching + authMethod := strings.ToLower(token.AuthMethod) + // Create refresh function based on auth method refreshFunc := func(ctx context.Context) (*KiroTokenData, error) { - switch token.AuthMethod { + switch authMethod { case "idc": return r.ssoClient.RefreshTokenWithRegion( ctx,