i'm trying to migrate users to firebase using the cli command auth:import.
My passwordHash is a SHA256 without salt from PHP hash function hash('sha256', $password);
When i use auth:import my user is added to my firebase users but without the password.
firebase auth:import user.json --hash-algo=SHA256 --rounds=64
For the passwordHash string i've tried with/without base64 and with diffrents --rounds (0/1/64/80 ...)
There's my user.json
passwordHash is mypass
SHA256 ea71c25a7a602246b4c39824b855678894a96f43bb9b71319c39700a1e045222
Base64 ZWE3MWMyNWE3YTYwMjI0NmI0YzM5ODI0Yjg1NTY3ODg5NGE5NmY0M2JiOWI3MTMxOWMzOTcwMGExZTA0NTIyMg==
{
"users": [
{
"localId": 1,
"email" : "[email protected]",
"emailVerified": true,
"passwordHash" : "ZWE3MWMyNWE3YTYwMjI0NmI0YzM5ODI0Yjg1NTY3ODg5NGE5NmY0M2JiOWI3MTMxOWMzOTcwMGExZTA0NTIyMg==",
"displayName" : "test",
"createdAt" : 1501452000000,
}
]
}
I've tried with a MD5 and it was working so i wondering what i've missing here.
Thank's, Julien.
ea71c25a7a602246b4c39824b855678894a96f43bb9b71319c39700a1e045222
is actually base16 encoded. The base64 string should be6nHCWnpgIka0w5gkuFVniJSpb0O7m3ExnDlwCh4EUiI=
. I verified it worked. – wyhao31