I am working on firebase for my android app and I trying to implement firebase ui auth,
but sign-in intent gets suck. Some users reported the authentication picker activity is not loaded.
When they tap on the button which launches the sign-in intent they get stuck.
Here is the code:
implementation 'com.google.firebase:firebase-auth:21.1.0'
implementation 'com.firebaseui:firebase-ui-auth:8.0.2'
public void createSignInIntent(String email)
{
// [START auth_fui_create_intent]
// Choose authentication providers
List<AuthUI.IdpConfig> providers = Arrays.asList(
new AuthUI.IdpConfig.EmailBuilder().setDefaultEmail(email).build()
);
// Create and launch sign-in intent
Intent signInIntent = AuthUI.getInstance()
.createSignInIntentBuilder()
.setAvailableProviders(providers)
.setLogo(R.drawable.unnamed)
.setAlwaysShowSignInMethodScreen(true)
.build();
signInLauncher.launch(signInIntent);
// [END auth_fui_create_intent]
}
I really have no idea what is going wrong here.
Thanks
CodePudding user response:
I have the same problem here using 8.0.2.
Just deactivate the Google Smart Lock.
Intent signInIntent = AuthUI.getInstance()
.createSignInIntentBuilder()
.setAvailableProviders(providers)
.setLogo(R.drawable.unnamed)
.setAlwaysShowSignInMethodScreen(true)
**.setIsSmartLockEnabled(false)**
.build();
just update your app and give a try.