Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdecock committed Dec 14, 2023
1 parent 2a71d28 commit 663a798
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/IdentityServer/Stores/Default/DefaultUserConsentStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ public async Task<Consent> GetUserConsentAsync(string subjectId, string clientId
{
var legacyKey = GetConsentKey(subjectId, clientId, useHexEncoding: false);
consent = await GetItemAsync(legacyKey);
await StoreUserConsentAsync(consent); // Write back the consent record to update its key
await RemoveItemAsync(legacyKey);
if(consent != null)
{
await StoreUserConsentAsync(consent); // Write back the consent record to update its key
await RemoveItemAsync(legacyKey);
}
}

return consent;
Expand Down

0 comments on commit 663a798

Please sign in to comment.