Reputation: 4619
My existing auth system is email-and-password. Going to be using Firebase Auth in the near future for handling social logins. How do I deal with my current accounts?
One option is to treat email/password as a "custom" auth scheme with Firebase Auth.
Other option is to add (actually move) my current accounts to Firebase Auth under their email/password auth scheme. This obviously offers long-term convenience as I wouldn't have to maintain a hybrid auth system for ever.
This would mean creating my existing users as new email/password users under Firebase Auth, then simply stop using my existing system and move over completely to Firebase Auth.
Here's the problem with doing this: being a good little boy, I used nonces and Bcrypt to encrypt each password, so I now have no way of recovering the original passwords (which would be required to seamlessly create email/password accounts in Firebase)... asking users to set their passwords again for (seemingly) no reason is bad UX.
Any suggestions?
Upvotes: 1
Views: 468
Reputation: 600130
Firebase has a tool that allows you to import users and their encrypted passwords. Bcrypt is one of the supported encryption formats. See https://firebase.google.com/docs/cli/auth.
Upvotes: 1