Kiro CLI blocks social login (Google/GitHub) when running in remote environments (SSH sessions), showing:
Social login is not supported in remote environments.
Please use BuilderID or Identity Center authentication.
The CLI detects remote environments by checking for SSH environment variables:
SSH_CLIENTSSH_CONNECTIONSSH_TTY
When any of these are present, it forces device code flow and restricts login methods to BuilderID/IDC only.
Copy social login tokens from a working local installation to the remote environment.
# On your local Mac/Windows where social login works
sqlite3 "/Users/username/Library/Application Support/kiro-cli/data.sqlite3" \
"SELECT key, value FROM auth_kv WHERE key = 'kirocli:social:token';"
sqlite3 "/Users/username/Library/Application Support/kiro-cli/data.sqlite3" \
"SELECT value FROM state WHERE key = 'api.codewhisperer.profile';"# On remote Linux machine
# Replace TOKEN_JSON with the actual token value from step 1
printf "INSERT OR REPLACE INTO auth_kv (key, value) VALUES ('kirocli:social:token', '%s');\n" \
'TOKEN_JSON' | sqlite3 "/home/username/.local/share/kiro-cli/data.sqlite3"
# Replace PROFILE_JSON with the actual profile value from step 1
printf "INSERT OR REPLACE INTO state (key, value) VALUES ('api.codewhisperer.profile', '%s');\n" \
'PROFILE_JSON' | sqlite3 "/home/username/.local/share/kiro-cli/data.sqlite3"kiro-cli doctor # Should show authentication success
kiro-cli chat --no-interactive # Should work with your social login- Kiro CLI only blocks social login during the authentication flow
- It doesn't prevent using existing social login tokens
- The tokens are encrypted and tied to your social account
- Database location:
~/.local/share/kiro-cli/data.sqlite3(Linux/Mac)
- Tokens will eventually expire and need refreshing
- You'll need to repeat this process when tokens expire
- This is a workaround, not an official solution
- Use BuilderID or Identity Center authentication (official recommendation)
- Run Kiro CLI locally and use SSH port forwarding for remote development
- Request official support for social login in remote environments
This workaround was discovered by analyzing the open source Amazon Q Developer CLI codebase and the closed source Kiro CLI behavior.