1

I need your help, SOF. I want to migrate users from Firebase to a PostgreSQL database, but my issue is with the hashed passwords stored by Firebase.

How can I verify if a plain-text password matches a hash provided by Firebase? I can't figure it out :/

Thank you in advance.

I try some PHP and github function

  • 1
    Just create a new account and compare the hashes. – Markus Zeller Jun 04 '23 at 18:11
  • It depends how the passwords were originally hashed, which you haven't told us – ADyson Jun 04 '23 at 18:30
  • Firebase specifies what hash function was determined for each password, you'll have to apply that same hash and compare the values (as Markus said). – Frank van Puffelen Jun 04 '23 at 21:56
  • 1
    Run both auth methods in parallel for a time, when a user logs in has no hash in pgsql, auth against firebase, and on success add the new hash to pgsql. After a "suitable" amount of time turn off firebase and require users who aren't in pgsql to reset their passwords. – Sammitch Jun 05 '23 at 02:33

0 Answers0