Skip to main content
The expo whoami command displays the username of the currently authenticated Expo account, or indicates if you’re not logged in.

Usage

What It Shows

The command displays:
  • Your Expo username (if logged in)
  • A message indicating you’re not logged in (if not authenticated)

Examples

Check Login Status

When logged in:
When not logged in:

Use in Scripts

Check authentication in shell scripts:

CI/CD Verification

Verify authentication before building:

Common Use Cases

Verify Login

After running expo login, confirm success:

Switch Accounts

Check which account is active when switching:

Team Collaboration

Confirm you’re using the correct account:

CI/CD Debugging

Troubleshoot authentication issues in CI:

Exit Codes

The command returns:
  • 0 - Success (logged in or not)
  • Non-zero - Error occurred

Checking in Scripts

Authentication Methods

Interactive Login

Access Token

Using environment variable:

Browser Login

Output Format

The command outputs:
  • Plain text username
  • No additional formatting
  • Suitable for parsing in scripts

Example Output

Troubleshooting

”Not logged in” When You Should Be

If you expect to be logged in but see “Not logged in”:
  1. Check credentials storage:
  2. Try logging in again:
  3. Verify access token:
  4. Check token validity:

Network Errors

If the command fails with network error:
Solutions:
  • Check internet connection
  • Verify Expo services status: https://status.expo.dev
  • Check firewall/proxy settings
  • Try again after a moment

Permission Errors

If you get permission errors:

CI/CD Usage

GitHub Actions

GitLab CI

Travis CI

Comparison with Other Commands

Programmatic Usage

Node.js Script

Python Script

Security Considerations

Safe to Run

The expo whoami command:
  • Only displays your username
  • Doesn’t expose sensitive information
  • Doesn’t modify any data
  • Safe to run in any environment

No Credentials Exposed

The command doesn’t reveal:
  • Your password
  • Access tokens
  • Email address (unless it’s your username)
  • Account details

Best Practices

Verify Before Operations

Check authentication before critical operations:

Log in CI/CD

Log authentication status in CI logs:

Team Workflows

Document expected account in team workflows:

Quick Reference