From f92612f7d94b015996ace772111b7f1636780a88 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 3 Dec 2025 13:31:10 +0800 Subject: [PATCH] Update user last sign-in time on password validation --- .../AspNetIdentity/AbpResourceOwnerPasswordValidator.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs index d4e0fb5490..b5694cb2fa 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs @@ -322,6 +322,9 @@ public class AbpResourceOwnerPasswordValidator : IResourceOwnerPasswordValidator additionalClaims.ToArray() ); + user.SetLastSignInTime(DateTimeOffset.UtcNow); + await UserManager.UpdateAsync(user); + await IdentitySecurityLogManager.SaveAsync( new IdentitySecurityLogContext {