fetchSignInMethodsForEmail method
Returns a list of sign-in methods that can be used to sign in a given user (identified by its main email address).
This method is useful when you support multiple authentication mechanisms if you want to implement an email-first authentication flow.
An empty List
is returned if the user could not be found.
A FirebaseAuthException
maybe thrown with the following error code:
- invalid-email:
- Thrown if the email address is not valid.
Implementation
@override
Future<List<String>> fetchSignInMethodsForEmail(String email) {
maybeThrowException(
this, Invocation.method(#fetchSignInMethodsForEmail, [email]));
return Future.value(_signInMethodsForEmail[email] ?? []);
}