PlaycademyPlaycademy

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:

Command
$ playcademy login --sso

SSO 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:

Command
$ playcademy login -e your@email.com

This will be followed by a prompt for your password.

Non-interactive login:

Command
$ playcademy login -e your@email.com -p yourpassword

Security

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:

Command
$ playcademy login  # Saves to 'default' profile

Named Profiles

Save credentials to a named profile:

Command
$ playcademy login --profile work

Use a profile for commands:

Command
$ playcademy deploy --profile work$ playcademy me --profile work

Profile 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):

Command
$ playcademy login  # Staging by default

Production:

Command
$ playcademy login --env production

This allows you to:

  1. Use different accounts for staging vs production
  2. Test with one account, deploy to production with another
  3. 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:

Command
$ playcademy login$ playcademy deploy  # Uses staging credentials$ playcademy login --env production$ playcademy deploy --env production  # Uses production credentials

Checking Authentication Status

Current User

View your authentication status:

Command
$ playcademy me

Shows:

  • User ID and email
  • Developer status
  • Current environment
  • Active profile

Example output:

Command
$ playcademy me
Output
✔ User information retrieved from staging  ID: ...  Email: dev@example.com  Environment: staging  Role: developer  Developer Status: approved

List Profiles

See all stored profiles across environments:

Command
$ playcademy profiles list$ playcademy profiles  # Alias

Shows 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

Command
$ playcademy logout

Logout from Named Profile

Command
$ playcademy logout work

Logout from Specific Environment

Command
$ playcademy logout --env production$ playcademy logout work --env production

Managing Profiles

Remove a Profile

Command
$ playcademy profiles remove work$ playcademy profiles rm work  # Alias

Remove All Profiles

Command
$ playcademy profiles reset$ playcademy profiles clear  # Alias

Be Warned

This removes all profiles across all environments.


Common Workflows

Multiple Accounts

If you have separate personal and work accounts:

Command
$ playcademy login --profile personal$ playcademy login --profile work$ playcademy deploy --profile personal$ playcademy deploy --profile work

Staging and Production

Deploy to staging for testing, production for release:

Command
$ playcademy login  # Staging$ playcademy login --env production$ playcademy deploy # Staging$ playcademy deploy --env production

API Key Authentication

For CI/CD or automation, use API keys instead of login:

Command
$ export PLAYCADEMY_API_TOKEN=your-api-key$ playcademy deploy

API 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?

On this page