-
Notifications
You must be signed in to change notification settings - Fork 171
[eas-cli] Add multi-account support #3340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
brentvatne
wants to merge
9
commits into
main
Choose a base branch
from
@brent/multi-account-switcher
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
|
Size Change: +10.6 kB (+0.02%) Total Size: 53.2 MB
|
|
✅ Thank you for adding the changelog entry! |
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
account:listcommand to show all logged-in accountsaccount:switchcommand to change the active accountaccount:loginto support adding additional accountsaccount:logoutto support logging out specific accounts or all accounts--accountflag for per-command account selectionMotivation
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=1in 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 indicatoreas account:switch- switch between accounts interactively or by nameeas account:logout- logout current, specific, or all accountseas account:view- shows current active accounteas <any-command> --account <name>- uses specified account for that command only (works with any command)