firebase auth:import do not use the right password
See original GitHub issuefirebase auth:import
appear to be broken?
With MD5:
firebase auth:import users.json --hash-algo=MD5 --rounds=0
{
"users":[
{
"localId":"uid1",
"email":"fedtest@gmail.com",
"emailVerified":true,
"displayName":"Test Foo Bar",
"passwordHash":"NzJkNGE1YTViNjA1YzUzYWUxYWM0NzhkOWE0OTc3ZDc=",
"salt":null
}
]
}
This works fine.
But, with SHA1, SHA256, etc.:
firebase auth:import users.json --hash-algo=SHA1 --rounds=0
{
"users":[
{
"localId":"uid1",
"email":"fedtest@gmail.com",
"emailVerified":true,
"displayName":"Test Foo Bar",
"passwordHash":"NDM3MDkxZjMxYmY1OTgwOWJkMzRjZDBjYzVlNGM3ZGE2ODIwZmU3Nw==",
"salt":null
}
]
}
this don’t allow me to login with the password that I choosed. The account is created, but I cannot login. On login I get error is:
Error: The password is invalid or the user does not have a password.
The plain password for those tests of mine is: tester5
. I tried with both the latest version of firebase-tools ( 7.2.4 ), and the previous major version as well - same behaviour.
Am I missing something?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Authenticate with Firebase using Password-Based Accounts ...
In the Firebase console, open the Auth section. On the Sign in method tab, enable the Email/password sign-in method and click Save. Create...
Read more >Firebase auth:import doesn't import password SHA256
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...
Read more >Firebase: Importing Users - Medium
But a problem arises when we imported our existing user using SHA1 encrypted password (yeah, we know this kind of encryption is not...
Read more >Using Firebase Authentication - FlutterFire
The method is a two-step operation; it will first create the new account (if it does not already exist and the password is...
Read more >Authentication with Vue 3 and Firebase - LogRocket Blog
To integrate Firebase Authentication into your application, you can use either the Firebase UI, which handles the UI flows for signing users in ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@cfofiu - you have to specify the hash-key of your old project while importing
The hash key is located in
Authentication
-> Users Table -> three dots menu on the upper rightHi @samtstern ,
I was hoping to get a bit of direction for a problem we’re having with the import users method. Our application has ± 2,000 weekly active users and we’re moving to firebase from our legacy system, which uses PHP SHA1 password hashing with rounds 0 to encrypt users’ passwords, like so:
Since
rounds=0
is rejected for SHA1, we’ve tried importing usingrounds=1
androunds=80
. Neither of them work. When trying to log in with that account, an incorrect password error is thrown:Any advice as to what number of rounds we should try? Is there any alternative solution to this problem, or are we out of luck with this one?