loginWithCode method

  1. @override
Future<Either<AuthServiceSignInFailure, LoginCodeResponse>> loginWithCode(
  1. String code
)
override

Implementation

@override
Future<Either<AuthServiceSignInFailure, LoginCodeResponse>> loginWithCode(String code) async {
  try {
    var result = await authCallable.call(LoginCodeRequest(loginCode: code).toJson());

    return right(LoginCodeResponse.fromJson(result.data));
  } catch (e) {
    loge(e);
    return left(AuthServiceSignInFailure.wrongPassword);
  }
}