Merge pull request #120 from Xm798/fix/kiro-auth-method-case

fix(auth): normalize Kiro authMethod to lowercase on token import
This commit is contained in:
Luis Pater
2026-01-24 04:58:50 +08:00
committed by GitHub
+6
View File
@@ -190,6 +190,9 @@ func LoadKiroIDEToken() (*KiroTokenData, error) {
return nil, fmt.Errorf("access token is empty in Kiro IDE token file")
}
// Normalize AuthMethod to lowercase (Kiro IDE uses "IdC" but we expect "idc")
token.AuthMethod = strings.ToLower(token.AuthMethod)
return &token, nil
}
@@ -219,6 +222,9 @@ func LoadKiroTokenFromPath(tokenPath string) (*KiroTokenData, error) {
return nil, fmt.Errorf("access token is empty in token file")
}
// Normalize AuthMethod to lowercase (Kiro IDE uses "IdC" but we expect "idc")
token.AuthMethod = strings.ToLower(token.AuthMethod)
return &token, nil
}