Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ public static IEndpointConventionBuilder MapIdentityApi<TUser>(this IEndpointRou
var refreshTicket = refreshTokenProtector.Unprotect(refreshRequest.RefreshToken);

// Reject the /refresh attempt with a 401 if the token expired or the security stamp validation fails
// By design: we don't check whether the account is locked out. Locking out is
// password brute-force protection and is therefore irrelevant to check here.
// Refreshing the token doesn't force a sign-in.
if (refreshTicket?.Properties?.ExpiresUtc is not { } expiresUtc ||
timeProvider.GetUtcNow() >= expiresUtc ||
await signInManager.ValidateSecurityStampAsync(refreshTicket.Principal) is not TUser user)
Expand Down
Loading