Skip to content

Commit

Permalink
remove handleCodeRedemption() as it's listed twice (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyf19 authored Jun 29, 2020
1 parent 9c532ba commit 8578da9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Microsoft.Identity.Web/TokenAcquisition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ public async Task AddAccountToCacheFromAuthorizationCodeAsync(

try
{
// As AcquireTokenByAuthorizationCodeAsync is asynchronous we want to tell ASP.NET core that we are handing the code
// even if it's not done yet, so that it does not concurrently call the Token endpoint. (otherwise there will be a
// race condition ending-up in an error from Azure AD telling "code already redeemed")
context.HandleCodeRedemption();

// The cache will need the claims from the ID token.
// If they are not yet in the HttpContext.User's claims, add them here.
if (!context.HttpContext.User.Claims.Any())
Expand Down

0 comments on commit 8578da9

Please sign in to comment.