Open willbattel opened 4 years ago
Hey @morganchen12 could I get your thoughts on this as a short-term solution to #851? I know it will be some time before 851 can be implemented, so as a workaround I'd like to get the phone number to do a Firestore lookup for finding the UID manually. As far as I can tell, there isn't a way for us to intercept the phone number provided by the user in the FUI flow.
The best way to do that would be to fork FirebaseUI, add the workaround there, and point your CocoaPods installation to your fork.
Regardless of my use case, would it not make sense to expose a phoneNumber
property on the FUIPhoneAuth
class? It already has an email
property- so it seems like providing the phone number would make sense. Is this thought misguided?
That thought makes sense. User identifiers (like phone/email) should be attached to the specific providers for those identifiers.
Step 1: Are you in the right place?
Step 2: Describe your environment
Step 3: Describe the problem:
We're using FUI for phone authentication. In the event on a merge conflict, where we do not get an
AuthDataResult
, I want to retrieve the phone number that the user provided from within theauthUI(_:didSignInWith:error:)
delegate function (before we dosignIn
, where we would then be able to get it directly from FIRAuth). What I think would make the most sense would be to add it as a property on the FUIPhoneAuth class similar to how we can get the email withauthUI.providers.first?.email?()
. Would this change be feasible?