Unable to login after importing user into Firebase Authentication

We are migrating users into Firebase Auth from legacy db who have their passwords hashed with SHA512.

We are able to successfully import the users into Firebase. However, when we try to login again with those users through Firebase Authentication, it gives an error:

Invalid password or this user has no password

Following are the details of code structure, the command used to import users, and the user.json that we are using.

Salt: salt

Password+salt hashed in SHA512:


Base-64 encoded password+salt:


Base-64 encoded salt:



  "users": [
      "localId": "123",
      "emailVerified": true,
      "email": "test@demo.com",
      "salt": "c2FsdA=="

Firebase command for importing user.json:

firebase --project=projectname auth:import user.json --hash-algo=SHA512 --rounds=80

Pleas let us know what we are missing here

Thank You

249 thoughts on “Unable to login after importing user into Firebase Authentication”

  1. 518827 130212An attention-grabbing dialogue is value comment. I believe which you require to write a lot more on this matter, it wont be a taboo subject nevertheless normally individuals are not sufficient to speak on such topics. Towards the next. Cheers 829715