-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoupgrade results in empty providerData #504
Comments
Hi, any updates on this one? |
I won't have time to look at it this week, but will try to address this next week. |
Okay thanks! |
After combing through the code, I'm not entirely sure if this is a bug in FirebaseUI (don't worry though, we can still push fix for it upstream). Does refreshing the user correctly populate the |
Debugged a little more, so if the authUI.shouldAutoUpgradeAnonymousUsers = false, the user is signed in through the provider and providerData is set, but if authUI.shouldAutoUpgradeAnonymousUsers = true, then the user is still an anonymous user even after logging in through a provider. |
More detail - this only happens on trying to sign in to an account that already exists and was upgraded. On trying to upgrade an account for the first time to a provider account that's never been used, it hangs on login, but the account is upgraded and visible in the Firebase console. It's just stuck with the spinner and never actually enters into func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?). Sorry if this is getting messy...let me know if I can provide any other info. |
authDataResult is nil in func authUI also |
Looking at the project, it looks like it's missing several files (fonts/images) and doesn't build off of a clone. I can replace these with placeholders for now. |
Ah, sorry, I've mostly been working locally so didn't sync every file. But let me know if I can help with anything. |
Hi, I'm having the same issues here. When I enable Also, when I try to sign in still with Let me now if I can help with anything 👍 |
#512 partially fixes this issue, the fix to the behavior @victor-sarda describes is in #519. |
Thanks for the update! Does #512 also populate authDataResult even if there's a mergeConflict error? |
No. The docs around this are exceedingly poor, but the merge conflict error basically means the two accounts can't be properly joined, since they both have their own separate account state that can't be resolved cleanly. So in the case of this error your account is still anonymous and the login has failed, and In the case where this error arises, you should take the auth credential out of the |
I'll submit a PR for the docs shortly. |
The fix has been released in 5.2.1. |
iOS version: 11.4
Firebase SDK version: FirebaseCore 5.5.0
FirebaseUI version: 5.2.0
CocoaPods Version: 1.5.3
Step 3: Describe the problem:
When FUIAuth.defaultAuthUI()?.shouldAutoUpgradeAnonymousUsers = true, calling Auth.auth().currentUser?.providerData[0] from func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?) results in a nil value.
So the display name and photoURL are not reachable. If the anonymous users bit is set to false, then providerData is no longer empty and works as expected.
Steps to reproduce:
Observed Results:
providerData is an empty array []
Expected Results:
providerData should have length 1 with the login information after signing in with a firebase UI login provider.
The text was updated successfully, but these errors were encountered: