public virtual async Task <bool> IsOptionalAsync() { var feature = await IdentityTwoFactorBehaviourFeatureHelper.Get(FeatureChecker); if (feature == IdentityTwoFactorBehaviour.Optional) { var setting = await IdentityTwoFactorBehaviourSettingHelper.Get(SettingProvider); if (setting == IdentityTwoFactorBehaviour.Optional) { return(true); } } return(false); }
public virtual async Task <bool> IsForcedDisableAsync() { var feature = await IdentityTwoFactorBehaviourFeatureHelper.Get(FeatureChecker); if (feature == IdentityTwoFactorBehaviour.Disabled) { return(true); } var setting = await IdentityTwoFactorBehaviourSettingHelper.Get(SettingProvider); if (setting == IdentityTwoFactorBehaviour.Disabled) { return(true); } return(false); }