signInWithEmailAndPassword method

Future<AuthUserCredentialVO> signInWithEmailAndPassword(
  1. String email,
  2. String password
)

Signs in the user with the provided email and password, and returns an AuthUserCredentialVO object.

Implementation

Future<AuthUserCredentialVO> signInWithEmailAndPassword(
    String email, String password) async {
  try {
    final authCredential =
        await _authDataService.signInWithEmailAndPassword(email, password);
    final vo = AuthUserCredentialVO.fromAuthUserCredential(authCredential);
    return vo;
  } catch (e) {
    if (e is RdevException) {
      throw AuthServiceException(
          code: e.code, message: e.message, stackTrace: e.stackTrace);
    }
    throw AuthServiceException(
        stackTrace: StackTrace.current, message: e.toString());
  }
}