Open MartonPRez opened 4 months ago
I've figured out what is happening, but not closing the issue to see if there is any workaround for this usecase.
Since our application requires us to use to use email+password login with a given tenant, and any other authentication methods without a tenant, we can't use the complete UI solution this library provides. Our workaround was to launch dedicated intents, one per auth provider. This caused the error, since when the library tries to link two accounts from different providers, both providers needs to be set as allowedProviders, which is not the case our aforementioned setup.
Step 1: Are you in the right place?
Step 2: Describe your environment
FirebaseUI version: 8.0.0
(Also tried multiple Firebase BOM versions between 28.0.0-32.8.1, tried FirebaseUI 7.2.2, and using an API 34 Play Services enabled emulator, same result)
Step 3: Describe the problem:
Getting
com.firebase.ui.auth.FirebaseUiException: Developer error
after going through authentication with Microsoft auth provider.The error comes from ProviderUtils.java:229. NOTE: My assumption is that this usecase happens, since the email I'm using xyz@mycompany.com is already authenticated with Google as a provider. The web AuthUI library handles this by asking giving the user the option to link the accounts. Is this what we don't have on Android, and if so, how do we handle this manually?
The setup in the firebase console, and the mobile client should be good, based on the facts that:
Observed Results:
onActivityResult
is called after the Custom Google Chrome tab is closed withresultCode=0
, and info in data.extras:IdpResponse{mUser=null, mToken='null', mSecret='null', mIsNewUser='false', mException=com.firebase.ui.auth.FirebaseUiException: Developer error, mPendingCredential=null}
Expected Results:
onActivityResult
called with a successfulresultCode=-1
, authentication succeeds.Relevant Code: