Description: if this feature were implemented, FirebaseUI would have the capability of linking account credentials to an already signed-in anonymous account.
As a sub-requirement, FirebaseUI should also expose an API to handle the case where the credentials the user tries to link to correspond to an already existing account, so the developer can handle the merge case manually.
+1 need this!
+1 also need this!
+1
So, If this were implemented, I guess it would by default have the same behavior as now, unless the developer uses the exposed API, to handle it? Otherwise, it would break stuff in previous implementations, right?
+1
I've actually began implementing the feature myself.
But I'm having problems use my fork as Pod and test my implementation. I was not even able to build forked sources. If anyone would help me with this we might be able to put it together.
I'm solving this by adding another delegate method which will be able to grab credentials and decide if FirebaseUI controller should proceed with singing in user or not. This should handle also the sub-requirement mentioned above.
My work is here: https://github.com/ibru/FirebaseUI-iOS/tree/anonymous-link
@ibru take a look at how Firebase is integrated into the ObjC sample.
Firebase is shipped as a static framework, so CocoaPods doesn't ordinarily let us use it as a dependency of a framework. We hack around this limitation by just shipping binaries, but it means testing changes locally becomes really painful.
@morganchen12 Any chance you could work on this? My PR on the Android side (https://github.com/firebase/FirebaseUI-Android/pull/309) has been waiting for months (Sep 2016). Thanks!
Yeah, I'll try to take a look soon.
That would be amazing, thanks!
@morganchen12 I guess there would be a way to not use the automatic conversion, right? I have done a different implementation to handle this and my code might break if this is done automatically in a future version.
Yeah, automatic conversion would be an opt-in feature.
Heads up that I've began working on this change. My current progress is in this branch https://github.com/ibru/FirebaseUI-iOS/commits/anonymous-link
I've tested my implementation with email signup and it seems to work properly, it will still need to test for other sign in providers. I'll be able to finish it at some time later since I'm currently working on other parts of my app.
Feel free to grab my code and use it/improve it.
In my app, I handle anonymous account linking in newly added FUIAuthDelegate method:
func authUI(_ authUI: FUIAuth, linkAnonyousUserWith credential: FIRAuthCredential, shouldLoginNewUserCallback completion: @escaping (Bool) -> Void) {
if let currentUser = FIRAuth.auth()?.currentUser, currentUser.isAnonymous {
currentUser.link(with: credential, completion: { (user, error) in
if error == nil {
completion(false)
}
else {
completion(true)
}
})
}
else {
completion(true)
}
}
@morganchen12 @yramanchuk Any updates on this?
None, unfortunately.
@morganchen12 dang it, I should just learn Objective C and do it myself! 😁
This issue, especially with the partial implementation above, has languished more for lack of initiative than anything else.
I'm hopeful that after I/O this week we'll have some more time to clear out the FirebaseUI iOS backlog.
Yeah, that would be awesome!!! I'm guessing FirebaseUI will be mentioned in the Zero to App talk and maybe a few others?
Hello, are there any plans for completing this feature? I have FirebaseUI in one of my side projects and didn't have a chance to work on this recently.
But if nobody is taking action in this I could try to finish my partial implementation above in coming weeks.
This issue, especially with the partial implementation above, has languished more for lack of initiative than anything else.
I'm hopeful that after I/O this week we'll have some more time to clear out the FirebaseUI iOS backlog.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
No plans as of yet, though this remains one of our most requested features. @yramanchuk
Another huge +1 from us too.
@ibru are you able to find any time to finish this off?
Guys,
I've looked into it today a bit. You can check out my fork (branch master) https://github.com/ibru/FirebaseUI-iOS
I've merged with upstream master branch + added my code. Basically I searched all places where code calls signInWithCredential: ... and like and encapsulated it into optional delegate method which takes the credential and allows it link to anonymous user instead. It should be enough to implement delegate method like I mentioned in my comment from Feb 3 and you should be able to merge credential into your anonymous user.
It's still very raw and I didn't have chance yet to test it a lot.
I think it's still not possible to easily integrate my fork of FirebaseAuthUI in cocoa pods using my repo url? Like this pod 'FirebaseUI', :git => 'https://github.com/ibru/FirebaseUI-iOS'?
I'm not sure what is the best way to test it? For email sign up, I've just copied files in FirebaseAuthUI folder into my project, edited sources and at the end copied it back to original repo folder.
But for testing FB, Twitter and other sign in providers it doesn't work that way since they require additional libraries to include and I'd prefer some better way then resolving all dependencies myself.
Can you advise me how best to test the implementation? Or feel free to grab my code and test yourself if you have a chance.
Another +1 from me - any news whether this will get addressed any time soon? The whole FirebaseUI project is useless for me without this.
+1 as well, it would be awesome !
+1 from me as well.
+1
+1
+1
+1
@protocol86 Would you advise against using that anonymous_updgrade_master branch in a production app that relied upon this functionality?
@protocol86 : Any idea when anonymous_updgrade_master would be available for release version with this feature?
@protocol86 : Android has got an anonymous upgrade with auto sign in upgrade and iOS for our app is waiting for that release. Any idea when this could be done? We need to get a plan for our release features.
Hi @Ankish, The master branch is close to being complete but not quite there yet (not fully tested). I will be taking a look at this shortly and update this thread in the coming days.
This has been released in 5.1.2.
Most helpful comment
No plans as of yet, though this remains one of our most requested features. @yramanchuk