Im curious about why android sdks don't have setCustomParameters. I'm working in a react native app and react in the web and I can handle auth/account-exists-with-different-credential error with firebase web sdk like this
const providers = await this.afAuth.auth.fetchSignInMethodsForEmail(error.email);
const firstPopupProviderMethod =
providers.find(p => this.firebaseAuthService.supportedPopupSignInMethods.includes(p));
// Test: Could this happen with email link then trying social provider?
if (!firstPopupProviderMethod) {
throw new Error(`Your account is linked to a provider that isn't supported.`);
}
const linkedProvider = this.firebaseAuthService.getProvider(firstPopupProviderMethod);
linkedProvider.setCustomParameters({ login_hint: error.email });
const resultProvider = await this.afAuth.auth.signInWithPopup(linkedProvider);
await resultProvider.user.linkWithCredential(error.credential);
I see that IOS sdks got setCustomParameters too but android sdks don't have it. There is something equivalent or just not exist for some reason. I'm reading how to handle the error in this issue https://github.com/invertase/react-native-firebase/issues/2802 but there can be another way to directly linkProvider instead of make user signIn with google again?.