Firebaseui-android: Cannot sign in via email on a device without a Google account

Created on 18 Jan 2017  路  6Comments  路  Source: firebase/FirebaseUI-Android

  • Android device: Genymotion Google Nexus 6P
  • Android OS version: 7.0.0
  • Google Play Services version: 10.0.84
  • Firebase/Play Services SDK version: 10.0.1
  • FirebaseUI version: 1.1.1

On a device where the user has no Google account yet the user cannot sign in via email address already associated with a Google account.

  1. Use AuthUI to sign in via Google account.
  2. Reset the device so it is not logged in to Google / Get another device that's not signed in.
  3. Use AuthUI to sign in via email address.
  4. Put in the address of previously used Google account and hit next.

Observed Results:

  1. Be redirected to Google sign in flow because "you've already used --insert email--".
  2. Fail with "An error has occurred." Toast and the following message in LogCat:

    E/GoogleProvider: Error logging in with Google. 5 null

Expected Results:

Start the GMS error resolution (Google system login flow) as does directly using the "Sign in with Google" button and actually get into the "Checking credentials" and "Add your account" screens.

auth fix-implemented bug

All 6 comments

@consp1racy I was able to reproduce this, thanks for pointing it out. Will try to get a fix in soon.

Ok I figured out where this occurs. When AuthMethodPickerActivity creates GoogleProvider it does so with email = null. When WelcomeBackIdpPrompt does this it sets email equal to the email entered from the email linking flow.

It seems that the Google Sign In API does not launch the add-account-to-device flow when setAccountName is called on the GoogleApiClient.

I will bring this up with the Google Sign In team to see what the recommended path forward is.

@consp1racy I have brought this up with the Sign In team and, for now, there's nothing FBUI can do. There is no way for us to launch the "add account" flow with a specific email in mind. That's why right now we return this error, as there's no way for us to trigger the proper google sign in flow and guarantee it's for the right account.

Hopefully the case of "user signs in with Google on device A and then attempts to sign in with email on device B where the google account is not present" is a very small edge case (I believe it is).

So as far as FBUI is concerned, this is working as intended and I will close the issue. I will log a feature request with the Android accounts team to see if we can enable this case.

Understood, here's a counter proposal: If such error should occur, do as if the "Sign in with Google" was pressed. That should at least point the user in the general direction instead of failing without an obvious way out. What do you think?

@consp1racy that's probably a good idea. I will have to see if we can unambiguously differentiate this error code from others and trigger that fallback. I will re-open and investigate some more.

The fix for this issue has been released in version 1.2.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RedCider picture RedCider  路  5Comments

Nebneb picture Nebneb  路  3Comments

joknu1 picture joknu1  路  4Comments

ozican picture ozican  路  6Comments

s-p-a-r-k picture s-p-a-r-k  路  5Comments