mirror of
https://github.com/githubhjs/CLIProxyAPIPlus.git
synced 2026-07-12 01:25:13 +00:00
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:
@@ -190,6 +190,9 @@ func LoadKiroIDEToken() (*KiroTokenData, error) {
|
|||||||
return nil, fmt.Errorf("access token is empty in Kiro IDE token file")
|
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
|
return &token, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,6 +222,9 @@ func LoadKiroTokenFromPath(tokenPath string) (*KiroTokenData, error) {
|
|||||||
return nil, fmt.Errorf("access token is empty in token file")
|
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
|
return &token, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user