https://supabase.com/ logo
#help
Title
# help
m

mtwichel

08/18/2021, 1:10 AM
Hey everyone 👋 we have an app with few thousand users and use Firebase currently. We’re very interested in Supabase as an alternative (mainly for a sql database instead of Firestore, which we’ve had issues scaling with), but we need a way to import our users from Firebase Auth. We use phone auth, Google, and Apple currently. Is it possible to import those users into Supabase?
There's also a new project someone started for importing data: https://github.com/imagitama/import-firestore-to-supabase
We had a discussion about this a couple weeks ago, that is, importing users from Firebase to Supabase, and the only issue is dealing with existing passwords, and there are a few ways to tackle that if you need to handle users with their existing passwords.
It's very easy if you just make them create a new password when they come in or authenticate them using any of the 3rd party providers we offer.
But if you need to migrate them off FB with those passwords, the best solution was a hybrid one, where you flag each user, and if they're coming from the "old" system (FB) you authenticate them with their FB password, then set the password they enter into Supabase in the background, then set the flag so that next time they authenticate directly with Supabase. Make sense?
m

mtwichel

08/18/2021, 4:13 PM
Thanks for your help! I'll take a look at these solutions. We actually intentionally don't have email-password authentication, just 3rd party and phone, so hopefully it's an easy enough switch 🙂
Hey @User, I created an issue on the auth migrator package you mentioned (https://github.com/liaujianjie/firebase-to-supabase-auth-migrator/issues/3) It looks like it doesn't support phone auth yet, so I was looking to contribute. Is it the case that a supabase auth user must have at least and email or phone?
b

burggraf

08/20/2021, 4:36 PM
I haven’t implemented phone auth yet since it’s so new but as I understand it you don’t need email just phone number.
I’m not sure how to implement phone auth in my systems because I use email as a key across multiple providers.
m

mtwichel

08/20/2021, 4:37 PM
Yeah I'm curious how supabase handles it 🤔 I'll have to do some investigation
b

burggraf

08/20/2021, 4:38 PM
I suppose I could create an account with a phone number then they could add and verify their email address later otherwise just handle it as a separate account if they never enter an email.
In other words, I could stop trying to solve all the world’s problems and just let the guy authenticate with a phone number and not worry about it.
Sometimes the solution is to not overthink things.
m

mtwichel

08/20/2021, 6:10 PM
Haha yeah. We're actually struggling a bunch with auth accounts being tied with their email because of phone number account throwing stuff off and also since sign in with Apple often hides their email it's so hard to manage those accounts sometimes
b

burggraf

08/20/2021, 9:42 PM
Yeah Apple allows an anonymous email which is basically then a separate user for you, but that’s the user’s problem and not yours. If they want to hide their email from you they lose the privilege of logging in with different providers, which is just fine I guess.