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
The AddProtectedWebApiCallsProtectedWebApi method registers an event handler for OnTokenValidated, but without preserving any existing registered event handler. As a side effect, any existing event registration gets lost, for example, the OnTokenValidated event handler registered in AddProtectedWebApi(), and indeed the OnTokenValidated event handler in JwtBearerMiddlewareDiagnostics (if subscribed).
… event handler AzureAD#154
Preserving existing event hander when registering OnTokenValidated event handler in AddProtectedWebApiCallsProtectedWebApi. Previous code was overwriting existing event handler meaning that logging via JwtBearerMiddlewareDiagnostics would no longer work and perhaps more seriously the OnTokenValidated event handler registered in AddProtectedWebApi (intended to "This check is required to ensure that the Web API only accepts tokens from tenants where it has been consented and provisioned.")
AzureAD#154
The AddProtectedWebApiCallsProtectedWebApi method registers an event handler for OnTokenValidated, but without preserving any existing registered event handler. As a side effect, any existing event registration gets lost, for example, the OnTokenValidated event handler registered in AddProtectedWebApi(), and indeed the OnTokenValidated event handler in JwtBearerMiddlewareDiagnostics (if subscribed).
I believe this is a bug.
microsoft-identity-web/src/Microsoft.Identity.Web/WebApiServiceCollectionExtensions.cs
Line 127 in 3151e1c
The text was updated successfully, but these errors were encountered: