1

I have a native app/website with MERN stack. Recently, I started working on the app from scratch (RN) and I was thinking to add Google/Facebook auth, I know I need firebase anyway but I have around 750 registered users.

I want to set up the login/registration with firebase only even for a simple email, but what am I supposed to do with the existing users? Their info is stored in MongoDB with hashed password, any idea how to implement such a thing?

daniel93
  • 181
  • 1
  • 12

1 Answers1

0
  1. Convert DB to JSON - Dump Mongo Collection into JSON format

  2. Install Firebase CLI - https://firebase.google.com/docs/cli

  3. Run below command to import them into firbease ( Customize parameter based on your data format https://firebase.google.com/docs/cli/auth )

firebase auth:import users.json --hash-algo=SCRYPT --hash-key=key --salt-separator=salt --rounds=8 --mem-cost=14 --debug

Amod Gokhale
  • 2,346
  • 4
  • 17
  • 32