Game Framework
CLI ReferenceCommands

game logout

Clear stored authentication credentials from your local configuration.

Usage

game logout

Description

The logout command removes all authentication credentials stored in your local CLI configuration file (~/.game/config.yml). This includes:

  • JWT tokens (from OIDC authentication)
  • API keys
  • Refresh tokens
  • User session data

When to Use

Switching Accounts

When you need to switch between different Game Framework Cloud accounts:

# Logout from current account
game logout

# Login with different account
game login

Security Cleanup

For security purposes, especially on shared machines:

# Clear credentials before leaving
game logout

Troubleshooting Authentication Issues

If you're experiencing authentication problems:

# Clear potentially corrupted credentials
game logout

# Re-authenticate
game login

Confirmation

The command provides confirmation when credentials are successfully cleared:

✓ Successfully logged out
  Credentials cleared from ~/.game/config.yml

What Happens

When you run game logout:

  1. Opens ~/.game/config.yml configuration file
  2. Removes all authentication-related fields:
    • auth.token
    • auth.api_key
    • auth.refresh_token
    • User identity information
  3. Preserves other settings (workspace preferences, API URLs)
  4. Displays confirmation message

Your workspace selections and other preferences are preserved after logout. Only authentication credentials are removed.

After Logout

After logging out, commands that require authentication will fail until you login again:

game logout

# These commands will require re-authentication:
game workspace list    # Error: Not authenticated
game publish          # Error: Not authenticated
game whoami           # Error: Not authenticated

Configuration File Location

The CLI configuration is stored at:

  • Linux/macOS: ~/.game/config.yml
  • Windows: %USERPROFILE%\.game\config.yml

After logout, you'll need to run game login to authenticate again before using cloud features.

Next Steps

After logging out:

  1. Login again with game login
  2. Select your workspace with game workspace select
  3. Verify authentication with game whoami