Browse Source

address copilot review: treat expiration boundary as inclusive

pull/25316/head
maliming 2 weeks ago
parent
commit
14027a9075
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 2
      modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpTwoFactorTokenProvider.cs

2
modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpTwoFactorTokenProvider.cs

@ -93,7 +93,7 @@ public abstract class AbpTwoFactorTokenProvider : IUserTwoFactorTokenProvider<Id
return false;
}
if (ToUnixSeconds(Clock.Now) > expiresAtUnixSeconds)
if (ToUnixSeconds(Clock.Now) >= expiresAtUnixSeconds)
{
await TryRemoveStoredTokenAsync(manager, user, tokenName);
return false;

Loading…
Cancel
Save