Authentication
Authentication
Section titled “Authentication”Authenticate with FlightStack:
flightstack loginThis opens your default browser for authentication. After completing login in the browser, you’ll see:
✓ Logged in successfully!
Welcome back, your-usernameHow It Works
Section titled “How It Works”- CLI generates a secure authentication request
- Browser opens to FlightStack login page
- You authenticate (email/password or OAuth)
- Token is securely stored locally
Token Storage
Section titled “Token Storage”Credentials are stored at ~/.flightstack/config.json:
{ "apiUrl": "https://api.flightstack.dev", "accessToken": "eyJhbG...", "refreshToken": "eyJhbG..."}Tokens are automatically refreshed when expired.
Logout
Section titled “Logout”Sign out and remove stored credentials:
flightstack logout✓ Logged out successfullyChecking Login Status
Section titled “Checking Login Status”Many commands require authentication. If not logged in:
Not logged in. Run: flightstack loginTroubleshooting
Section titled “Troubleshooting”Browser Doesn’t Open
Section titled “Browser Doesn’t Open”Manually visit the URL shown in the terminal and complete authentication.
Token Expired
Section titled “Token Expired”Re-run flightstack login to refresh your session.
Multiple Accounts
Section titled “Multiple Accounts”The CLI supports one account at a time. Log out and log in with a different account as needed.