Skip to content

[Identity] SetLockoutEndDateAsync can't set a time before existed value #61901

@ngyyuusora

Description

@ngyyuusora

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

await _adminUserManager.SetLockoutEndDateAsync(user, new DateTimeOffset(2999, 1, 1, 0, 0, 0, TimeSpan.Zero));

then set same user

await _adminUserManager.SetLockoutEndDateAsync(user, new DateTimeOffset(2030, 1, 1, 0, 0, 0, TimeSpan.Zero));
Console.WriteLine(await _adminUserManager.GetLockoutEndDateAsync(user));

still 2999 (also in DB)

Expected Behavior

LockoutEnd value should be updated.

Steps To Reproduce

netcore9.0 with mysql

Exceptions (if any)

No response

.NET Version

9.0.104

Anything else?

user.LockoutEnd = DateTimeOffset.UtcNow;
_manager.UpdateAsync(user);

works

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issuearea-identityIncludes: Identity and providers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions