login method

Future<AuthResponse> login(
  1. String email,
  2. String password
)

Login with existing credentials.

Returns the AuthResponse. Check AuthResponse.success and AuthResponse.errorCode to determine the outcome:

errorCode Meaning
0 Success
1 User not found
2 Wrong credentials

Implementation

Future<AuthResponse> login(String email, String password) async {
  final request = LoginRequest()
    ..email = email
    ..password = password;

  return await _stub.login(request);
}