Authentication
Login workflows, profiles, and environment management
Overview
The Playcademy CLI uses secure authentication to deploy projects and manage your account.
Authentication is environment-aware; you can have separate credentials for staging and production.
Logging In
Browser-based SSO
The recommended way to authenticate is with browser-based SSO:
$ playcademy login --ssoSSO Authentication
This opens your browser for authentication with Timeback.
Once complete, your credentials are stored securely on your device.
Email and Password
Authenticate with email/password:
$ playcademy login -e your@email.comThis will be followed by a prompt for your password.
Non-interactive login:
$ playcademy login -e your@email.com -p yourpasswordSecurity
Avoid putting passwords directly in commands when possible.
The interactive prompt is more secure.
Authentication Profiles
Profiles let you manage multiple Playcademy accounts on the same machine.
Default Profile
By default, credentials are saved to the default profile:
$ playcademy login # Saves to 'default' profileNamed Profiles
Save credentials to a named profile:
$ playcademy login --profile workUse a profile for commands:
$ playcademy deploy --profile work$ playcademy me --profile workProfile Environment Variable
Set PLAYCADEMY_PROFILE=work to use a profile for all commands without the flag.
Environment-Aware Authentication
Credentials are stored separately for staging and production environments.
Different Environments
Staging (default):
$ playcademy login # Staging by defaultProduction:
$ playcademy login --env productionThis allows you to:
- Use different accounts for staging vs production
- Test with one account, deploy to production with another
- Keep staging and production credentials isolated
How It Works
When you log in, credentials are saved to an environment-specific bucket.
When you run commands, the CLI uses the credentials for the current environment.
Example workflow:
$ playcademy login$ playcademy deploy # Uses staging credentials$ playcademy login --env production$ playcademy deploy --env production # Uses production credentialsChecking Authentication Status
Current User
View your authentication status:
$ playcademy meShows:
- User ID and email
- Developer status
- Current environment
- Active profile
Example output:
$ playcademy me✔ User information retrieved from staging ID: ... Email: dev@example.com Environment: staging Role: developer Developer Status: approvedList Profiles
See all stored profiles across environments:
$ playcademy profiles list$ playcademy profiles # AliasShows profiles for both staging and production:
┌─────────────────────────────┐
│ Staging │
├─────────┬───────────────────┤
│ Profile │ Email │
├─────────┼───────────────────┤
│ default │ dev@example.com │
│ work │ work@company.com │
└─────────┴───────────────────┘
┌─────────────────────────────┐
│ Production │
├─────────┬───────────────────┤
│ Profile │ Email │
├─────────┼───────────────────┤
│ default │ dev@example.com │
└─────────┴───────────────────┘Logging Out
Logout from Default Profile
$ playcademy logoutLogout from Named Profile
$ playcademy logout workLogout from Specific Environment
$ playcademy logout --env production$ playcademy logout work --env productionManaging Profiles
Remove a Profile
$ playcademy profiles remove work$ playcademy profiles rm work # AliasRemove All Profiles
$ playcademy profiles reset$ playcademy profiles clear # AliasBe Warned
This removes all profiles across all environments.
Common Workflows
Multiple Accounts
If you have separate personal and work accounts:
$ playcademy login --profile personal$ playcademy login --profile work$ playcademy deploy --profile personal$ playcademy deploy --profile workStaging and Production
Deploy to staging for testing, production for release:
$ playcademy login # Staging$ playcademy login --env production$ playcademy deploy # Staging$ playcademy deploy --env productionAPI Key Authentication
For CI/CD or automation, use API keys instead of login:
$ export PLAYCADEMY_API_TOKEN=your-api-key$ playcademy deployAPI keys are shown once only after successfully running playcademy login.
When to Use API Keys
API keys are designed for automated deployments (GitHub Actions, CI/CD).
For local development, use playcademy login.
What's Next?
Command Reference
Look up all authentication-related commands and profile flags.
Development Guide
Learn how to run the local backend server and test auth-protected flows.
Deployment Guide
See how authenticated projects move from staging to production.
Quick Start
Build your first project end-to-end before diving deeper.
