0
votes

I am looking to integrate FirebaseAuthUI to handle authenticating users to my app.

Currently, the app has an in house authentication method, which allows users to signup and signin with their email address and a password.

We have over 100,000 users who are signed up with our app using our in house auth mechanism, therefore I need to come up with a way to migrate existing users who signed up on the in house system to now be able to sign in with Firebase.

Ideally, I would like to use the FirebaseAuthUI component as it handles the auth flow for various providers, much simplifying the client side code for authentication.

However, I can't see any clear migration path to allow existing users to auth with Firebase and to then pair up the returned Firebase user with that user in our back end to perform migration.

Is this a common problem that has been solved before? Or is FirebaseAuthUI for more greenfield projects where migration of existing users is not required?

1

1 Answers

1
votes

When migrating from another authentication system, you'll typically want to import the user data into Firebase Authentication using the auth:import command of the Firebase CLI, or the Admin SDK. At this point you can also set your own, existing UID, instead of having to map the new one from Firebase and from your existing system.

By importing the users you are pre-creating the existing user's accounts in Firebase, so that they can immediately sign in (instead of having to sign up) using Firebase.