Android FirebaseUi Auth Does Not Prompt Google Account Selection during Sign In

If you are using FirebaseUI for Firebase Auth, you might bump into issue where Google signin always automatically signin using the previously selected account, without prompting for account selection after you signout.

NOTE: I didn't have this issues on Xiaomi Mi4i Android 5 (Lollipop), but it is persistent on Samsung S9 Android 8 (Oreo).

You need to disable SmartLock when creating AuthUI intent.

val providers = arrayListOf(    AuthUI.IdpConfig.GoogleBuilder().build(),    // AuthUI.IdpConfig.EmailBuilder().build(),    AuthUI.IdpConfig.AnonymousBuilder().build())val intent = AuthUI.getInstance()    .createSignInIntentBuilder()    .setIsSmartLockEnabled(false)    // .setIsSmartLockEnabled(false, true)    .setAvailableProviders(providers)    .build()startActivityForResult(intent, REQUEST_SIGN_IN)

When signout, you should use AuthUI.getInstance().signOut rather than FirebaseAuth.getInstance().signOut.

// FirebaseAuth.getInstance().signOut()AuthUI.getInstance().signOut(context)


❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.