Authentication Commands
Manage your authentication and account settings with the Erdo CLI.erdo login
Authenticate with the Erdo platform to access your account and agents.Basic Usage
Authentication Methods
- OAuth (Recommended)
- API Token
- SSO
Command Options
| Option | Description | Example |
|---|---|---|
--force | Force re-authentication | erdo login --force |
--server | Specify server URL | erdo login --server https://staging.erdo.ai |
--method | Authentication method | erdo login --method oauth |
--token | Use API token | erdo login --token abc123 |
--port | OAuth callback port | erdo login --port 8080 |
--timeout | Login timeout (seconds) | erdo login --timeout 60 |
--no-browser | Skip browser opening | erdo login --no-browser |
Examples
erdo logout
Log out from the Erdo platform and clear stored authentication.Options
| Option | Description |
|---|---|
--clear-cache | Clear all cached authentication data |
--server | Logout from specific server |
--all | Logout from all configured servers |
erdo whoami
Display current authentication status and user information.Output Information
Basic Output
Basic Output
Verbose Output
Verbose Output
erdo token
Manage API tokens for programmatic access.Create Token
List Tokens
Revoke Token
Token Options
| Option | Description | Example |
|---|---|---|
--name | Token display name | --name "Production Deploy" |
--permissions | Token permissions | --permissions read,write |
--expires | Expiration time | --expires 30d |
--scope | Token scope | --scope organization |
Authentication Troubleshooting
Login Failures
Login Failures
Common Issues:
- Invalid credentials
- Network connectivity
- Server configuration
Token Issues
Token Issues
Common Issues:
- Expired tokens
- Insufficient permissions
- Rate limiting
SSO Problems
SSO Problems
Common Issues:
- Browser not opening
- Callback URL issues
- Provider configuration
Security Best Practices
Token Management
- Use specific token permissions - Set appropriate expiration dates - Rotate tokens regularly - Store tokens securely
Environment Security
- Use environment variables for tokens - Don’t commit tokens to version control - Use different tokens per environment - Monitor token usage
Access Control
- Follow principle of least privilege - Use organization-scoped tokens - Regular access reviews - Revoke unused tokens
Monitoring
- Monitor login attempts - Track token usage - Set up alerts for suspicious activity - Regular security audits
Configuration Files
Authentication Config
The CLI stores authentication data in~/.erdo/auth.json: