twoFactorLogin method

Complete login using a 2FA challenge

@param {TwoFactorLoginRequest} request The login request that contains the user credentials used to log them in. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<LoginResponse, Errors>> twoFactorLogin(
    TwoFactorLoginRequest request) {
  return _startAnonymous<LoginResponse, Errors>()
      .withUri('/api/two-factor/login')
      .withJSONBody(request)
      .withMethod('POST')
      .withResponseHandler(
          defaultResponseHandlerBuilder((d) => LoginResponse.fromJson(d)))
      .go();
}