fetchSignInMethodsForEmail method
Fetches the sign-in methods available for the provided email.
Implementation
Future<List<String>> fetchSignInMethodsForEmail(String email) async {
try {
final providers = await _auth.fetchSignInMethodsForEmail(email);
return providers;
} catch (err) {
if (err is FirebaseAuthException) {
/// When email is not found (iOS?)
if (err.code == 'null-error') {
return [];
}
throw AuthDataServiceException.fromRdevException(err.toRdevException());
}
throw AuthDataServiceException(
message: err.toString(),
);
}
}