Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.welcome_back_idp_prompt_layout); IdpResponse newUserIdpResponse = IdpResponse.fromResultIntent(getIntent()); mPrevCredential = AuthCredentialHelper.getAuthCredential(newUserIdpResponse); User oldUser = User.getUser(getIntent()); String providerId = oldUser.getProvider(); for (IdpConfig idpConfig : mActivityHelper.getFlowParams().providerInfo) { if (providerId.equals(idpConfig.getProviderId())) { switch (providerId) { case GoogleAuthProvider.PROVIDER_ID: mIdpProvider = new GoogleProvider(this, idpConfig, oldUser.getEmail()); break; case FacebookAuthProvider.PROVIDER_ID: mIdpProvider = new FacebookProvider( this, idpConfig, mActivityHelper.getFlowParams().themeId); break; case TwitterAuthProvider.PROVIDER_ID: mIdpProvider = new TwitterProvider(this); break; default: Log.w(TAG, "Unknown provider: " + providerId); finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent(ErrorCodes.UNKNOWN_ERROR)); return; } } } if (mIdpProvider == null) { <START> Log.w(TAG, "Firebase login successful." + <END> " Account linking failed due to provider not enabled by application"); finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent(ErrorCodes.UNKNOWN_ERROR)); return; } ((TextView) findViewById(R.id.welcome_back_idp_prompt)) .setText(getIdpPromptString(oldUser.getEmail())); mIdpProvider.setAuthenticationCallback(this); findViewById(R.id.welcome_back_idp_button).setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { mActivityHelper.showLoadingDialog(R.string.progress_dialog_signing_in); mIdpProvider.startLogin(WelcomeBackIdpPrompt.this); } }); }</code><technical_language>nit: this error message include provider enabled</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.welcome_back_idp_prompt_layout); IdpResponse newUserIdpResponse = IdpResponse.fromResultIntent(getIntent()); mPrevCredential = AuthCredentialHelper.getAuthCredential(newUserIdpResponse); User oldUser = User.getUser(getIntent()); String providerId = oldUser.getProvider(); for (IdpConfig idpConfig : mActivityHelper.getFlowParams().providerInfo) { if (providerId.equals(idpConfig.getProviderId())) { switch (providerId) { case GoogleAuthProvider.PROVIDER_ID: mIdpProvider = new GoogleProvider(this, idpConfig, oldUser.getEmail()); break; case FacebookAuthProvider.PROVIDER_ID: mIdpProvider = new FacebookProvider( this, idpConfig, mActivityHelper.getFlowParams().themeId); break; case TwitterAuthProvider.PROVIDER_ID: mIdpProvider = new TwitterProvider(this); break; default: Log.w(TAG, "Unknown provider: " + providerId); finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent(ErrorCodes.UNKNOWN_ERROR)); return; } } } if (mIdpProvider == null) { Log.w(TAG, "Firebase login unsuccessful." + " Account linking failed due to provider not enabled by application: " + providerId); finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent(ErrorCodes.UNKNOWN_ERROR)); return; } ((TextView) findViewById(R.id.welcome_back_idp_prompt)) .setText(getIdpPromptString(oldUser.getEmail())); mIdpProvider.setAuthenticationCallback(this); findViewById(R.id.welcome_back_idp_button).setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { mActivityHelper.showLoadingDialog(R.string.progress_dialog_signing_in); mIdpProvider.startLogin(WelcomeBackIdpPrompt.this); } }); }