validateLoginChallenge method

Future<AuthPublicResponse> validateLoginChallenge({
  1. required String challenge,
})

Implementation

Future<SoftcorpGrpc.AuthPublicResponse> validateLoginChallenge(
    {required String challenge}) async {
  if (testMode == true) {
    print("validateLoginChallenge");
  }
  if (mockMode == true) {
    return await Future.delayed(const Duration(seconds: 2)).then((_) {
      return SoftcorpGrpc.AuthPublicResponse()..client = mockApp;
    });
  }
  SoftcorpGrpc.AuthPublicRequest req = SoftcorpGrpc.AuthPublicRequest();
  req.challenge = challenge;
  return client.validateLoginChallenge(req);
}