setUserMfaPreference method

Future<bool> setUserMfaPreference(
  1. IMfaSettings? smsMfaSettings,
  2. IMfaSettings? softwareTokenMfaSettings
)

This is used by an authenticated user to enable MFA for itself

Implementation

Future<bool> setUserMfaPreference(
  IMfaSettings? smsMfaSettings,
  IMfaSettings? softwareTokenMfaSettings,
) async {
  _signInUserSessionCheck();

  try {
    await client!.request('SetUserMFAPreference', {
      'SMSMfaSettings': smsMfaSettings?.toMap(),
      'SoftwareTokenMfaSettings': softwareTokenMfaSettings?.toMap(),
      'AccessToken': _signInUserSession?.getAccessToken().getJwtToken(),
    });
    return true;
  } catch (err) {
    return false;
  }
}