Anonymous account automatic conversion to permanent account
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.
-
- 2017 v 20:22, Morgan Chen [email protected]:
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?