requestTwoFactorCode method

Future<bool> requestTwoFactorCode(
  1. String username,
  2. String password
)

Requests a two factor code for the given username and password

Implementation

Future<bool> requestTwoFactorCode(String username, String password) async {
  try {
    await _post('/api/2fa', data: {'username': username, 'password': password});

    return true;
  } catch (e) {
    return false;
  }
}