Authentication
How the CloudSignal CLI authenticates using browser-based login and manages session tokens.
The CLI uses the same authentication as the dashboard. You log in once via the browser, and the CLI manages session tokens automatically.
Login
cloudsignal loginHow it works:
- The CLI opens your default browser to the CloudSignal dashboard login page
- You authenticate using your existing credentials (email/password, Google, etc.)
- After login, the dashboard securely passes session tokens back to the CLI
- Tokens are stored locally at
~/.cloudsignal/credentials.json
The login flow times out after 5 minutes if no authentication is completed.
Session Tokens
After login, the CLI stores two tokens:
| Token | Purpose | Lifetime |
|---|---|---|
| Access token | Authenticates API requests | ~1 hour |
| Refresh token | Gets new access tokens | Days/weeks |
The CLI handles token refresh automatically. When your access token expires, the next command silently refreshes it using the refresh token.
If the refresh token also expires, you'll see:
Error: Session expired. Run `cloudsignal login` again.Check Auth Status
cloudsignal whoamiOutput:
Email: you@example.com
Organization: 550e8400-e29b-41d4-a716-446655440000
Token expires: in 47 minutesLogout
cloudsignal logoutThis deletes ~/.cloudsignal/credentials.json. You'll need to run cloudsignal login again before using other commands.
Security
- Tokens are stored with
0600file permissions (owner read/write only) - The CLI's local callback server only binds to
127.0.0.1 - The dashboard validates redirect URIs are
localhostonly - Tokens are passed directly from the dashboard - no third-party services exposed
Never share your ~/.cloudsignal/credentials.json file. It contains active session tokens.
Troubleshooting
"Login timed out"
The browser auth flow must complete within 5 minutes. If it times out:
- Check that your browser opened the login page
- Make sure no firewall is blocking
localhostconnections - Try again with
cloudsignal login
Browser doesn't open
On headless servers or WSL, the CLI may not be able to open a browser. Copy the URL from the terminal output and open it manually.