Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase: export user accounts’ email and password hashes

I use email/password authentication for my Firebase.

I’m considering moving to a different backend and I’m wondering if there is any way to export user emails/password hashes so that I can authenticate them outside Firebase?

I would also need to know the hashing algorithm.

like image 201
Vlad GURDIGA Avatar asked Nov 07 '14 12:11

Vlad GURDIGA


People also ask

How can I get user details from Firebase?

If the user login with a custom "email/password" you don't know anything else about that user (apart from the unique user id). If a user login with Facebook, or with Google sign in, you can get other information like the profile picture url. It is explained here: firebase.google.com/docs/auth/android/… .

How do I get all users from Firebase Authentication?

If you want to view a list of users that has registered thru Firebase Auth, you may view them in https://console.firebase.google.com/ then go to your project and select authentication , in the Users list is all the users that have registered thru Firebase Auth.


2 Answers

You can use the firebase-cli by writing firebase auth:export save_file.csv --format=csv or firebase auth:export save_file.json --format=json

More details can be found on the firebase documentation page: https://firebase.google.com/docs/cli/auth#authexport

like image 88
Jürgen Brandstetter Avatar answered Sep 19 '22 20:09

Jürgen Brandstetter


I did not get any option on firebase console UI. So you need to install firebase tool using npm.

npm install -g firebase-tools 

and then login using

firebase login 

after login you need to run one of command

CSV Format

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

JSON Format

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

you can get the project-id from home screen of firebase console

like image 26
Sunil Garg Avatar answered Sep 18 '22 20:09

Sunil Garg