Skip to main content

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

CodeDescription
0Successfully logged out
1Error 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 delete or 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-all to 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:

  1. Shell history: Clear with:

    history -c  # Bash
  2. Environment variables: Unset with:

    unset SIGNALOID_API_KEY
  3. Config backups: Check for:

    find ~ -name "config.json*" -path "*signaloid-cli*"

Revoking Access

To fully revoke access:

  1. Logout locally:

    signaloid-cli auth logout
  2. Delete the API key (if using API key authentication):

    signaloid-cli keys list
    signaloid-cli keys delete --key-id key_abc123
  3. Logout from all devices (if using email/password):

    signaloid-cli users logout-all

See Also

Learn More