Kiro Provider
Access Amazon CodeWhisperer (AWS) models through Kiro OAuth authentication with flexible browser modes and IDE token import.Quick Start
Authentication
Auth Methods
Since v7.44.0, Kiro supports method-aware authentication with multiple OAuth flows.
| Method | Flow Type | CLI Flag | Port | Use Case |
|---|---|---|---|---|
aws (default) | Device Code | --kiro-aws-login | None | Best for AWS org support, polling-based |
aws-authcode | Authorization Code | --kiro-aws-authcode | 9876 | Browser-based redirect |
google | Authorization Code | --kiro-google-login | 9876 | Social OAuth via Google |
github | Device Code | — | None | Management API only (not CLI) |
OAuth Flow
OAuth Specifics:
- Default Flow: Device Code (AWS) - polling-based, no callback port
- Callback Port: 9876 (only for
aws-authcodeandgooglemethods) - Token Format:
kiro-{oauth}-{profile_id}.json - Account ID: Extracted from filename (not email-based)
Browser Mode Control
Kiro supports browser mode customization for reliability:- Normal Browser (Default)
- Incognito Mode
- Saves AWS SSO credentials
- Faster re-auth on token expiry
- More reliable on Linux
Configuration
Set default browser mode in~/.ccs/config.yaml:
On Linux, incognito mode often fails for AWS OAuth. Keep
kiro_no_incognito: true for best reliability.Token Import from Kiro IDE
Skip browser OAuth by importing existing token from Kiro IDE:How Import Works
IDE Config Locations (platform-dependent):
- Linux:
~/.config/kiro/or~/.kiro/ - macOS:
~/Library/Application Support/Kiro/ - Windows:
%APPDATA%\Kiro\
Multi-Account Support
Kiro uses filename-based account identification (no email):Account Identification
Pattern:kiro-{oauth}-{profile_id}.json → {oauth}-{profile_id}
Example:
- Token file:
kiro-github-ABC123.json - Account ID:
github-ABC123 - Nickname: Auto-generated from ID or custom via
--nickname
Account Commands
Configuration
Config Keys
Configure via~/.ccs/config.yaml:
Environment Variables
Auto-managed by CCS. Manual override rarely needed.
Commands Reference
Basic Usage
Authentication Commands
Browser Mode
Account Management
Troubleshooting
OAuth Fails on Linux
Symptom: Browser opens but OAuth callback never completes Cause: Incognito mode unreliable on Linux Solution: Ensure normal browser mode enabled:--no-incognito flag explicitly:
Token Import Fails
Symptom:ccs kiro --import returns “Token not found”
Cause: Kiro IDE not installed or not authenticated
Solution: Install Kiro IDE and sign in first, or use standard OAuth:
AWS SSO Session Expired
Symptom: API errors after token expiry Solution: Re-authenticate:Wrong Account Being Used
Symptom: Unexpected AWS account in use Solution: Check default account:Storage Locations
| Path | Description |
|---|---|
~/.ccs/cliproxy/auth/kiro-*.json | OAuth tokens (one per account) |
~/.ccs/cliproxy/accounts.json | Account registry, nicknames |
~/.ccs/cliproxy/config.yaml | CLIProxy configuration |
~/.ccs/config.yaml | Global CCS config (browser mode) |
Token Structure
Kiro OAuth token file format:kiro-{oauth}-{profile_id}.json
Account Identification: Extracted from filename (no email field)
AWS SSO Details
Authorization Flow
Device Code (defaultaws method):
- CCS requests device code from AWS OIDC endpoint
- User enters code at verification URL
- CCS polls for token completion
- OAuth token cached locally
aws-authcode and google methods):
- Browser opens OAuth login page
- User signs in (AWS SSO or Google)
- Redirect to CCS callback server (port 9876)
- OAuth token cached locally
Token Refresh
- Automatic refresh via
refresh_token - Triggered when
access_tokenexpires - Graceful re-auth prompt if refresh fails
- Normal browser mode speeds up re-auth (credentials cached)
Advanced Features
Import Mechanism
Token Import Flow:- Scan IDE paths (OS-specific)
- Read config files (JSON/TOML format)
- Extract OAuth credentials
- Validate token structure
- Copy to CCS auth directory
- Register in accounts.json
Browser Mode Rationale
Why--no-incognito is Default:
- Linux Compatibility: Incognito mode has known issues with AWS OAuth on Linux
- UX: Faster re-auth when credentials cached in normal browser
- Security Trade-off: Acceptable for single-user machines, override for shared systems
Cost Information
| Tier | Access | Cost |
|---|---|---|
| AWS Builder ID | Individual developers | Free tier available |
| IAM Identity Center | Enterprise | AWS subscription required |
Next Steps
Multi-Account Setup
Manage multiple AWS accounts
Token Import
Import from Kiro IDE
Browser Modes
Configure incognito vs normal
CLIProxy Config
Advanced CLIProxy settings
