You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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();
, verify that we still need to handle the code redemption twice. This should not be needed and is the sign smell like someone is using async void.
Why is it so?
We had many cases, in the past, where the code was redeemed twice (once by Microsoft.Identity.Web and once by ASP.NET Core), which is not allowed by Azure AD.
However, async should ensure that this works fine.
What to do?
If this bugs, then the bug needs to be fixed.
The text was updated successfully, but these errors were encountered:
Which Version of Microsoft Identity Web are you using ?
Microsoft Identity Web 0.1.5-preview
**Where is the issue?
*In
microsoft-identity-web/src/Microsoft.Identity.Web/TokenAcquisition.cs
Lines 125 to 128 in 0b628e2
Why is it so?
We had many cases, in the past, where the code was redeemed twice (once by Microsoft.Identity.Web and once by ASP.NET Core), which is not allowed by Azure AD.
However, async should ensure that this works fine.
What to do?
If this bugs, then the bug needs to be fixed.
The text was updated successfully, but these errors were encountered: