diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateOrUpdateDtoBase.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateOrUpdateDtoBase.cs
index 41981b2ca8..e2fe874dbd 100644
--- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateOrUpdateDtoBase.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserCreateOrUpdateDtoBase.cs
@@ -26,8 +26,6 @@ namespace Volo.Abp.Identity
[DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
public string PhoneNumber { get; set; }
- public bool TwoFactorEnabled { get; set; }
-
public bool LockoutEnabled { get; set; }
[CanBeNull]
@@ -35,7 +33,7 @@ namespace Volo.Abp.Identity
protected IdentityUserCreateOrUpdateDtoBase() : base(false)
{
-
+
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserDto.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserDto.cs
index 9f94d7b599..f7291a4e82 100644
--- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserDto.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserDto.cs
@@ -23,12 +23,10 @@ namespace Volo.Abp.Identity
public bool PhoneNumberConfirmed { get; set; }
- public bool TwoFactorEnabled { get; set; }
-
public bool LockoutEnabled { get; set; }
public DateTimeOffset? LockoutEnd { get; set; }
public string ConcurrencyStamp { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs
index 74b210066f..070a452218 100644
--- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs
@@ -162,7 +162,6 @@ namespace Volo.Abp.Identity
(await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors();
}
- (await UserManager.SetTwoFactorEnabledAsync(user, input.TwoFactorEnabled)).CheckErrors();
(await UserManager.SetLockoutEnabledAsync(user, input.LockoutEnabled)).CheckErrors();
user.Name = input.Name;
diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
index 899c28ef51..7bf72a18ae 100644
--- a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
+++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
@@ -120,9 +120,6 @@
@L["DisplayName:LockoutEnabled"]
-
- @L["DisplayName:TwoFactorEnabled"]
-
@if (NewUserRoles != null)
@@ -191,9 +188,6 @@
@L["DisplayName:LockoutEnabled"]
-
- @L["DisplayName:TwoFactorEnabled"]
-
@if (EditUserRoles != null)
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml
index b171b785a2..d0b52a345c 100644
--- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml
+++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml
@@ -26,8 +26,7 @@
-
-
+
@foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties())
{
if (propertyInfo.Type.IsEnum)
@@ -56,4 +55,4 @@
-
\ No newline at end of file
+
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs
index a868890632..03bbd859cc 100644
--- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs
@@ -79,8 +79,6 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users
[DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
public string PhoneNumber { get; set; }
- public bool TwoFactorEnabled { get; set; } = true;
-
public bool LockoutEnabled { get; set; } = true;
}
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml
index 56ac3929f1..ca404c7e67 100644
--- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml
+++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml
@@ -28,8 +28,7 @@
-
-
+
@foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties())
{
if (propertyInfo.Type.IsEnum)
@@ -46,7 +45,7 @@
value="@propertyInfo.GetInputValueOrNull(Model.UserInfo.ExtraProperties[propertyInfo.Name])" />
}
}
-
+
@for (var i = 0; i < Model.Roles.Length; i++)
@@ -59,4 +58,4 @@
-
\ No newline at end of file
+
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs
index a2336c2b8e..29d044f9da 100644
--- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs
@@ -87,8 +87,6 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users
[DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
public string PhoneNumber { get; set; }
- public bool TwoFactorEnabled { get; set; }
-
public bool LockoutEnabled { get; set; }
}
diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs
index a56631b2ae..278ef10ced 100644
--- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs
@@ -98,7 +98,6 @@ namespace Volo.Abp.Identity
{
UserName = johnNash.UserName,
LockoutEnabled = true,
- TwoFactorEnabled = true,
PhoneNumber = CreateRandomPhoneNumber(),
Password = "123qwe4R*",
Email = CreateRandomEmail(),
@@ -135,7 +134,7 @@ namespace Volo.Abp.Identity
{
//Get user
var johnNash = await _userAppService.GetAsync(_testData.UserJohnId);
-
+
//Act
var input = new IdentityUserUpdateDto
@@ -144,7 +143,6 @@ namespace Volo.Abp.Identity
Surname = "Nash-updated",
UserName = johnNash.UserName,
LockoutEnabled = true,
- TwoFactorEnabled = true,
PhoneNumber = CreateRandomPhoneNumber(),
Email = CreateRandomEmail(),
RoleNames = new[] { "admin", "moderator" },
diff --git a/modules/identity/test/Volo.Abp.Identity.AspNetCore.Tests/Volo/Abp/Identity/AspNetCore/ExternalLoginProvider_Tests.cs b/modules/identity/test/Volo.Abp.Identity.AspNetCore.Tests/Volo/Abp/Identity/AspNetCore/ExternalLoginProvider_Tests.cs
index ee9a56432e..c8d9f37c27 100644
--- a/modules/identity/test/Volo.Abp.Identity.AspNetCore.Tests/Volo/Abp/Identity/AspNetCore/ExternalLoginProvider_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.AspNetCore.Tests/Volo/Abp/Identity/AspNetCore/ExternalLoginProvider_Tests.cs
@@ -44,7 +44,6 @@ namespace Volo.Abp.Identity.AspNetCore
user.Name.ShouldBe("Test Name");
user.Surname.ShouldBe("Test Surname");
user.EmailConfirmed.ShouldBeTrue();
- user.TwoFactorEnabled.ShouldBeFalse();
user.PhoneNumber.ShouldBe("123");
user.PhoneNumberConfirmed.ShouldBeFalse();
user.IsExternal.ShouldBeTrue();