Skip to content

Conversation

@brentvatne
Copy link
Member

@brentvatne brentvatne commented Jan 26, 2026

Summary

  • Add multi-account session management, allowing users to be logged into multiple Expo accounts simultaneously
  • Add account:list command to show all logged-in accounts
  • Add account:switch command to change the active account
  • Update account:login to support adding additional accounts
  • Update account:logout to support logging out specific accounts or all accounts
  • Add global --account flag for per-command account selection

Motivation

I've wanted this for a while since I personally switch between Expo accounts fairly often. I've also heard from other folks who switch between company and personal accounts, or accounts across different projects that their agency manages, that this would be helpful.

Test plan

Set EAS_EXPERIMENTAL_ACCOUNT_SWITCHER=1 in your env, or prefix all of the commands you run with it.

  • eas account:login - login to a new account (adds to existing sessions)
  • eas account:list - shows all logged-in accounts with active indicator
  • eas account:switch - switch between accounts interactively or by name
  • eas account:logout - logout current, specific, or all accounts
  • eas account:view - shows current active account
  • eas <any-command> --account <name> - uses specified account for that command only (works with any command)

SDK 55+ supports --source-maps with a value (e.g., 'inline'), but older
SDKs only support it as a boolean flag. Passing a value to older SDKs
causes it to be parsed as the project root positional argument, resulting
in "Invalid project root" errors.
Add experimental multi-account support behind EAS_EXPERIMENTAL_ACCOUNT_SWITCHER=1 flag.

SessionManager changes:
- Add v1 schema with accounts object and activeAccountId
- Support storing multiple account sessions
- Add switchAccountAsync/switchAccountByUsernameAsync methods
- Add getAllAccounts, removeAccountAsync, removeAllAccountsAsync
- Maintain backward compatibility with Expo CLI via legacy fields
- Read credentials from active account when multi-account enabled
New commands for multi-account support (hidden when feature flag disabled):
- account:list: Show all logged-in accounts with active indicator
- account:switch: Switch between accounts interactively or by username
- login: Add menu to add account or switch when already logged in
- logout: Add username arg and --all flag for selective logout
- view: Show other logged-in accounts when multi-account enabled
Allow specifying which account to use for any command via --account flag
when multi-account is enabled. Switches to the specified account before
executing the command.
@github-actions
Copy link

github-actions bot commented Jan 26, 2026

Size Change: +10.6 kB (+0.02%)

Total Size: 53.2 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 53.2 MB +10.6 kB (+0.02%)

compressed-size-action

@github-actions
Copy link

✅ Thank you for adding the changelog entry!

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 19.49861% with 289 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.30%. Comparing base (6eeb15b) to head (a268fae).

Files with missing lines Patch % Lines
packages/eas-cli/src/user/SessionManager.ts 23.85% 100 Missing and 15 partials ⚠️
packages/eas-cli/src/commands/account/logout.ts 11.33% 37 Missing and 10 partials ⚠️
packages/eas-cli/src/commands/account/switch.ts 22.00% 32 Missing and 7 partials ⚠️
packages/eas-cli/src/commands/account/list.ts 27.78% 22 Missing and 4 partials ⚠️
packages/eas-cli/src/commands/account/login.ts 7.15% 21 Missing and 5 partials ⚠️
packages/eas-cli/src/commands/account/view.ts 5.00% 16 Missing and 3 partials ⚠️
packages/eas-cli/src/commandUtils/EasCommand.ts 10.53% 14 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3340      +/-   ##
==========================================
- Coverage   49.67%   49.30%   -0.36%     
==========================================
  Files         671      673       +2     
  Lines       28018    28356     +338     
  Branches     5802     5884      +82     
==========================================
+ Hits        13914    13979      +65     
- Misses      12916    13143     +227     
- Partials     1188     1234      +46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant