disableTwoFactor method

Future<ClientResponse<void, Errors>> disableTwoFactor(
  1. String userId,
  2. String methodId,
  3. String code
)

Disable two-factor authentication for a user.

@param {String} userId The Id of the User for which you're disabling two-factor authentication. @param {String} methodId The two-factor method identifier you wish to disable @param {String} code The two-factor code used verify the the caller knows the two-factor secret. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<void, Errors>> disableTwoFactor(
    String userId, String methodId, String code) {
  return _start<void, Errors>()
      .withUri('/api/user/two-factor')
      .withUriSegment(userId)
      .withParameter('methodId', methodId)
      .withParameter('code', code)
      .withMethod('DELETE')
      .go();
}