Skip to content

Autoupgrade results in empty providerData #504

@lswang1618

Description

@lswang1618

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:

  1. set FUIAuth.defaultAuthUI()?.shouldAutoUpgradeAnonymousUsers = true
  2. call Auth.auth().currentUser?.providerData[0] from func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?)
  3. Sign in using a provider from the firebase UI picker
  4. Observe that providerData is an empty array.

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions