game logout
Clear stored authentication credentials from your local configuration.
Usage
game logoutDescription
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 loginSecurity Cleanup
For security purposes, especially on shared machines:
# Clear credentials before leaving
game logoutTroubleshooting Authentication Issues
If you're experiencing authentication problems:
# Clear potentially corrupted credentials
game logout
# Re-authenticate
game loginConfirmation
The command provides confirmation when credentials are successfully cleared:
✓ Successfully logged out
Credentials cleared from ~/.game/config.ymlWhat Happens
When you run game logout:
- Opens
~/.game/config.ymlconfiguration file - Removes all authentication-related fields:
auth.tokenauth.api_keyauth.refresh_token- User identity information
- Preserves other settings (workspace preferences, API URLs)
- 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 authenticatedConfiguration 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.
Related Commands
game login- Authenticate with Game Framework Cloudgame whoami- Check current authentication statusgame workspace- Manage workspaces (requires authentication)
Next Steps
After logging out:
- Login again with
game login - Select your workspace with
game workspace select - Verify authentication with
game whoami