signaloid-cli auth logout
Clear local authentication and sign out from Signaloid.
Synopsis
signaloid-cli auth logout
Description
The logout command removes authentication credentials from your local configuration. The behavior differs based on the authentication method:
- API key authentication: Removes the stored API key from config
- Email/password authentication: Logs out from the server AND clears local config
Examples
Basic Logout
signaloid-cli auth logout
Output:
✔ Logged out locally
Logout and Verify
#!/bin/bash
signaloid-cli auth logout
# Verify logout was successful
if ! signaloid-cli auth whoami > /dev/null 2>&1; then
echo "✓ Successfully logged out"
else
echo "✗ Still authenticated"
exit 1
fi
Secure Cleanup Script
#!/bin/bash
echo "Logging out and cleaning up..."
# Logout
signaloid-cli auth logout
# Optional: Remove config file entirely
rm -f ~/.config/signaloid-cli/config.json
echo "✓ Cleanup complete"
Exit Codes
| Code | Description |
|---|---|
0 | Successfully logged out |
1 | Error during logout |
Notes
- Does not revoke API keys (do this from the Signaloid dashboard or using
signaloid-cli keys delete) - Config file remains but authentication section is cleared
- Safe to run multiple times
- Does not require network connection for API key logout
- Email/password logout requires network connection to invalidate server session
Authentication Modes
API Key Logout
When logged in with an API key:
- Removes the API key from local config
- Does not revoke the key
- Key can still be used on other machines
- To fully revoke: Use
signaloid-cli keys deleteor the web dashboard
Email/Password Logout
When logged in with email/password:
- Invalidates the server session
- Clears local config
- Requires network connection
- Other sessions on other machines remain active (use
signaloid-cli users logout-allto logout everywhere)
Security Considerations
When to Logout
Always logout when:
- Finished using a shared/public computer
- Switching between different Signaloid accounts
- Testing authentication flows
- Rotating credentials
Optional to logout when:
- On your personal secure workstation
- Using long-lived API keys for automation
- Running scheduled jobs
Credential Cleanup
After logout, credentials may still exist in:
-
Shell history: Clear with:
history -c # Bash -
Environment variables: Unset with:
unset SIGNALOID_API_KEY -
Config backups: Check for:
find ~ -name "config.json*" -path "*signaloid-cli*"
Revoking Access
To fully revoke access:
-
Logout locally:
signaloid-cli auth logout -
Delete the API key (if using API key authentication):
signaloid-cli keys listsignaloid-cli keys delete --key-id key_abc123 -
Logout from all devices (if using email/password):
signaloid-cli users logout-all
See Also
- signaloid-cli auth - Auth command overview
- signaloid-cli auth login - Authenticate with Signaloid
- signaloid-cli auth whoami - Check authentication status
- signaloid-cli keys - Manage API keys
- signaloid-cli users logout-all - Logout from all devices
Learn More
- Authentication Guide - Complete authentication guide
- Security Best Practices - Keep your credentials secure