requestOtp method

Future<String> requestOtp(
  1. dynamic emailOrPhone
)

Request the user receive a One Time Password either via SMS or Email

Implementation

Future<String> requestOtp(emailOrPhone) async {
  String url = '$authEndpoint/user/otp';
  Map body = {"emailOrPhone": emailOrPhone};

  Response res = await dio.post(url, data: body);
  _storeOtpRequestNonce(res.data);
  return res.data["nonce"];
}