-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
I am updating the library from version 8.x.x to version 9.x.x and have encountered the following problem
It seems that the new version of the library no longer honors the 'setAllowNewAccounts' option.
When using the old version of the library, the sign-up button disappears when AllowNewAccounts is set to false.
Use the email authentication provider
List<AuthUI.IdpConfig> providers = List.of( new AuthUI.IdpConfig.EmailBuilder() .setAllowNewAccounts(false) .setDefaultEmail(defaultEmail) .setRequireName(false) .build());
Create and launch sign-in intent
Intent signInIntent = AuthUI.getInstance(AuthManager.getSharedInstance().getFirebaseApp()) .createSignInIntentBuilder() .setTheme(R.style.LoginTheme) .setCredentialManagerEnabled(true) .setAvailableProviders(providers) .build(); signInLauncher.launch(signInIntent);
The UI always shows both 'Sign up' and 'Sign in' buttons.
My app does not allow users to sign up, so the presence of the "Sign up" button is confusing.
Even worse, if I press "Sign up" and enter an email address of an existing user, it displays an error message saying that the email address does not match.
