Export and import firebase auth data

Pham Ngoc Quy
1 min readMay 12, 2020

--

Follow this tutorial. So you need to install firebase tool using npm:

npm install -g firebase-tools

and login using:

firebase login

Export firebase user for a specified project on your firebase

we have two output file format: CSV, JSON:

firebase auth:export file_name.csv --format=json --project <project-id>

Import firebase user data

Go to your console firebase on page Authentication select user:

Now, you can get hash_config of authentication data. You need this config to import your data:

hash_config {
algorithm: hash_algorithm,
base64_signer_key: key,
base64_salt_separator: salt_separator,
rounds: rounds,
mem_cost: mem_cost,
}

Import data:

firebase auth:import file_name.json   \
--hash-algo=hash_algorithm \
--hash-key=key \
--salt-separator=salt_separator \
--rounds=rounds \
--mem-cost=mem_cost \

Hope this tutorial helpful to you.

--

--