signIn method
Sign in a user given an email and a password
Returns a Future that resolves to an AuthResultStatus based on the
success of the sign in.
Implementation
Future<AuthResultStatus> signIn({
required String email,
required String password,
}) async {
return instance
.signInWithEmailAndPassword(email: email, password: password)
.then((userCredential) async {
final user = userCredential.user;
if (user != null) {
return checkApproved(user);
} else {
return AuthResultStatus.undefined;
}
}).onError(
(error, stackTrace) => handleExeption(error! as FirebaseAuthException),
);
}