From 9339c92a5108ba979ab2ca2db33eb1ead06ee95b Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 3 Dec 2025 13:29:05 +0800 Subject: [PATCH] Remove last sign-in time update from SignInManager --- .../Identity/AspNetCore/AbpSignInManager.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) 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 d922356397..09f3e4bf24 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 @@ -1,16 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Security.Claims; -using System.Threading.Tasks; +using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Volo.Abp.Identity.Settings; using Volo.Abp.Settings; -using Volo.Abp.Timing; namespace Volo.Abp.Identity.AspNetCore; @@ -94,12 +89,12 @@ public class AbpSignInManager : SignInManager /// /// The user /// Null if the user should be allowed to sign in, otherwise the SignInResult why they should be denied. - public virtual async Task CallPreSignInCheckAsync(IdentityUser user) + public virtual async Task CallPreSignInCheckAsync(IdentityUser user) { return await PreSignInCheck(user); } - protected override async Task PreSignInCheck(IdentityUser user) + protected override async Task PreSignInCheck(IdentityUser user) { if (!user.IsActive) { @@ -133,11 +128,4 @@ public class AbpSignInManager : SignInManager { return await base.SignInOrTwoFactorAsync(user, isPersistent, loginProvider, bypassTwoFactor); } - - public override async Task SignInWithClaimsAsync(IdentityUser user, AuthenticationProperties authenticationProperties, IEnumerable additionalClaims) - { - user.SetLastSignInTime(DateTimeOffset.UtcNow); - await UserManager.UpdateAsync(user); - await base.SignInWithClaimsAsync(user, authenticationProperties, additionalClaims); - } }