expo login command authenticates you with your Expo account, allowing you to use services like EAS Build, EAS Submit, and EAS Update.
Usage
Options
Your Expo account username or email. Alias:
-uYour Expo account password. Alias:
-pOne-time password from your two-factor authentication device.
Log in using Single Sign-On (SSO). Alias:
-sLog in using your web browser. Alias:
-bAuthentication Methods
Interactive Login (Default)
The simplest way to log in:- Username or email
- Password
- OTP code (if 2FA is enabled)
Browser-Based Login
Log in using your web browser:- Opens your default browser
- Redirects to Expo authentication page
- Returns authentication token to CLI
- Completes login automatically
- More secure (no password in terminal)
- Supports SSO providers
- Works with password managers
- Better for shared machines
SSO Login
For organizations using Single Sign-On:- SAML-based SSO
- Enterprise identity providers
- Organization-managed accounts
Command-Line Credentials
Provide credentials directly (useful for automation):- Shell history
- Process lists
- CI/CD logs
With Two-Factor Authentication
If you have 2FA enabled:Examples
Interactive Login
Browser Login
SSO Login
Automated Login (CI/CD)
For automation, use access tokens instead:Where Credentials Are Stored
After successful login, credentials are stored in:- macOS: Keychain
- Linux: Encrypted file in
~/.expo - Windows: Credential Manager
Viewing Stored Credentials
Check if you’re logged in:Account Requirements
Creating an Account
If you don’t have an Expo account:Account Types
- Personal - Free tier for individuals
- Team - Collaborative features for teams
- Enterprise - Advanced features for organizations
Common Use Cases
First-Time Setup
Switching Accounts
Team Collaboration
Each team member logs in with their own account:CI/CD Authentication
Use access tokens instead ofexpo login:
Two-Factor Authentication
Why Enable 2FA
Two-factor authentication adds security by requiring:- Your password (something you know)
- OTP code (something you have)
Enabling 2FA
- Go to https://expo.dev/settings/security
- Enable two-factor authentication
- Scan QR code with authenticator app
- Save backup codes
Logging In with 2FA
Troubleshooting
Invalid Credentials
- Verify username/email
- Check password (case-sensitive)
- Reset password at https://expo.dev/reset-password
- Try
--browserlogin method
2FA Issues
- Ensure device time is synchronized
- Use backup codes if authenticator unavailable
- Regenerate 2FA codes in account settings
Network Errors
- Check internet connection
- Verify firewall settings
- Try again with:
npx expo login --browser - Check Expo status: https://status.expo.dev
Already Logged In
SSO Not Available
- Contact organization administrator
- Use regular login method
- Verify organization has SSO enabled
Security Best Practices
Use Browser Login
Prefer browser-based authentication:- No password in terminal
- No credentials in history
- Supports password managers
Enable 2FA
Protect your account with two-factor authentication:- Enable at https://expo.dev/settings/security
- Use authenticator app (not SMS)
- Save backup codes securely
Use Access Tokens for CI/CD
Never store passwords in CI/CD:Logout on Shared Machines
Always logout after using shared computers:Rotate Access Tokens
Regularly rotate access tokens:- Revoke old tokens
- Generate new tokens
- Update CI/CD secrets
Access Tokens
What Are Access Tokens
Access tokens are:- Long-lived authentication credentials
- Alternative to username/password
- Ideal for automation and CI/CD
- Can be revoked independently
Creating Access Tokens
- Go to https://expo.dev/accounts/[username]/settings/access-tokens
- Click “Create Token”
- Name your token
- Copy token (shown only once)
Using Access Tokens
Set as environment variable:Token Permissions
Tokens can:- Build with EAS Build
- Submit to app stores
- Publish with EAS Update
- Access project resources
Revoking Tokens
Revoke compromised or unused tokens:- Go to token settings
- Click “Revoke”
- Generate new token if needed
Organizations
Joining an Organization
After logging in, access organization resources:Organization Accounts
Organizations provide:- Shared projects
- Team collaboration
- Centralized billing
- Access control
Related Commands
After logging in, you can use:expo whoami- Check current userexpo logout- Sign outeas build- Build with EAS Buildeas submit- Submit to app storeseas update- Publish OTA updates