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
Use in Scripts
Check authentication in shell scripts:CI/CD Verification
Verify authentication before building:Common Use Cases
Verify Login
After runningexpo 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”:-
Check credentials storage:
-
Try logging in again:
-
Verify access token:
-
Check token validity:
- Tokens may expire
- Revoked tokens don’t work
- Generate new token at: https://expo.dev/settings/access-tokens
Network Errors
If the command fails with network error:- 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
| Command | Purpose | Output |
|---|---|---|
expo whoami | Check current user | Username or “Not logged in” |
expo login | Authenticate | Login prompt |
expo logout | Sign out | Confirmation message |
expo register | Create account | Registration prompt |
Programmatic Usage
Node.js Script
Python Script
Security Considerations
Safe to Run
Theexpo 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:Related Commands
expo login- Authenticate with Expoexpo logout- Sign out of your accountexpo register- Create a new account