Skip to content

Support emulators:export and import for auth.#2955

Merged
yuchenshi merged 6 commits into
masterfrom
ys/auth-export
Dec 18, 2020
Merged

Support emulators:export and import for auth.#2955
yuchenshi merged 6 commits into
masterfrom
ys/auth-export

Conversation

@yuchenshi

@yuchenshi yuchenshi commented Dec 17, 2020

Copy link
Copy Markdown
Member

Description

Adds support for emulators:export and emulators:start --import.

Scenarios Tested

See end to end test added

Sample Commands

firebase emulators:start
# on separate terminal
firebase emulators:export my-dump

Later: firebase emulators:start --import my-dump.

--export-on-exit should also work, although I didn't test it.

Fixes #2749.

@yuchenshi yuchenshi requested a review from sam-gc December 17, 2020 23:34
@google-cla google-cla Bot added the cla: yes Manual indication that this has passed CLA. label Dec 17, 2020
@yuchenshi

Copy link
Copy Markdown
Member Author

Open question: what if you import with a different projectId?

@yuchenshi

Copy link
Copy Markdown
Member Author

Open question: what if you import with a different projectId?

Removed projectId from exported file path for now. It now exports only from the default projectId and imports only to the default projectId. This is now ready for review.

Comment thread scripts/triggers-end-to-end-tests/tests.ts
Comment thread src/emulator/hubExport.ts Outdated
@yuchenshi yuchenshi merged commit 9e175eb into master Dec 18, 2020
@yuchenshi yuchenshi deleted the ys/auth-export branch December 18, 2020 02:12
@farcondee

Copy link
Copy Markdown

What's the status on this? It's merged to master but not yet released?

@samtstern

Copy link
Copy Markdown
Contributor

@farcondee this has been merged and released, if you're using the latest CLI version and having trouble using this please file a new issue!

@farcondee

Copy link
Copy Markdown

@samtstern My bad, I had an older version. Installed the latest and this fix works perfectly!

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

Labels

cla: yes Manual indication that this has passed CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emulator export does not save created auth users

4 participants