Reputation: 99
I have a CSV file of just email address, first and last name, and company name and I need to import this as a list of users to Firebase Authentication. I would like the user to be prompted to choose a password on their first attempt at logging in through the app, or even to simply use the existing 'forgot password' option. How would I go about importing this list of users? I have found tutorials on importing existing users with existing usernames and passwords but never with just a username.
When using firebase auth:import <path/to/file.csv> --project <projectId>
I get a message saying:
No hash algorithm specified. Password users cannot be imported.
Processing /Users/<USERNAME>/Downloads/fbimporttest.csv (628 bytes)
) has invalid data format: Password hash should be base64 encoded.
It seems like a password is required - is it possible to import users without providing an initial password?
I am using Flutter and Firebase for this.
Thank you!
Edit: as per the comment by Laurynas Letkauskas, this is now possible: https://firebase.google.com/docs/auth/admin/import-users#java_7
Upvotes: 0
Views: 1040
Reputation: 317372
It's not possible - all users must have a password. What you should do instead is assign an initial password (even if it's the same for everyone), and have the user change it after the sign in with it. While this is by no means secure, it's likely your easiest option.
Upvotes: 1