game logout
Clear stored authentication credentials from your local configuration.
Usage
game logoutDescription
The logout command clears the auth section (token, API key, and expiry) from
your local CLI configuration file (~/.game/config.yml). This includes:
- The JWT access token (from OIDC device-flow login)
- A stored API key
- The token's
expires_at
It first asks for confirmation. If you are not currently logged in, it prints
Not currently logged in and exits without changes.
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 first prompts for confirmation (default No); answering no aborts without changes. On success it prints:
Logged out successfully
To log back in, run: game loginWhat Happens
When you confirm game logout:
- Clears the
authsection of~/.game/config.yml(token, api_key, expires_at) - Preserves your other settings —
defaults.workspace_idandpreferences - Displays the 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