Open davhev8619 opened 6 months ago
Seems to be a duplicate of #2514 - version mismatch between libraries.
@davhev8619 Does this error still happen for you? Can you try to explicitly reference Microsoft.IdentityModel.Protocols.OpenIdConnect 7.4.0 or make sure it matches with the other Microsoft.IdentityModel.* package versions.
Which version of Microsoft.IdentityModel are you using? Bug from version 7.4.0 and upwards
Where is the issue?
[ ] M.IM.JsonWebTokens
Other (please describe)
Is this a new or an existing app? a. The app is in production and I have upgraded to a new version of Microsoft.IdentityModel.*
Repro Use OpenIdConnect as authentication
Expected behavior Authentication should work
Actual behavior An unhandled exception occurred while processing the request. InvalidOperationException: Cannot redirect to the authorization endpoint, the configuration may be missing or invalid. Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties)
Stack Query Cookies Headers Routing InvalidOperationException: Cannot redirect to the authorization endpoint, the configuration may be missing or invalid. Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties) Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties) Microsoft.AspNetCore.Authentication.AuthenticationHandler.ChallengeAsync(AuthenticationProperties properties)
Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, string scheme, AuthenticationProperties properties)
Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler+<>c__DisplayClass0_0+<g__Handle|0>d.MoveNext()
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Possible solution Check difference between where it works