diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSignInManager.cs b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSignInManager.cs index 61387f6536..f4b4a2d35a 100644 --- a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSignInManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSignInManager.cs @@ -42,7 +42,7 @@ public class AbpSignInManager : SignInManager _identityUserManager = userManager; } - public override async Task PasswordSignInAsync( + public async override Task PasswordSignInAsync( string userName, string password, bool isPersistent, @@ -86,7 +86,7 @@ public class AbpSignInManager : SignInManager return await base.PasswordSignInAsync(userName, password, isPersistent, lockoutOnFailure); } - protected override async Task PreSignInCheck(IdentityUser user) + protected async override Task PreSignInCheck(IdentityUser user) { if (!user.IsActive) { @@ -107,4 +107,17 @@ public class AbpSignInManager : SignInManager return await base.PreSignInCheck(user); } + + /// + /// This is to call the protection method SignInOrTwoFactorAsync + /// + /// + /// + /// + /// + /// + public virtual async Task CallSignInOrTwoFactorAsync(IdentityUser user, bool isPersistent, string loginProvider = null, bool bypassTwoFactor = false) + { + return await base.SignInOrTwoFactorAsync(user, isPersistent, loginProvider, bypassTwoFactor); + } }