mattmorg55 / Owin.Security.Keycloak

Keycloak Authentication Middleware for the C# OWIN Pipeline
http://keycloak.jboss.org
MIT License
17 stars 20 forks source link

SecurityTokenSignatureKeyNotFoundException: IDX10501: Signature validation failed. Unable to match key #25

Open cdecinkoKnight opened 2 years ago

cdecinkoKnight commented 2 years ago

I've spun up a new .NET Framework 4.72 MVC project. I updated all of the Nuget packages and installed Owin.Security.Keycloak, Microsoft.Owin.Host.SystemWeb and Microsoft.Owin.Security.Cookies. I am able to get to the login page, enter my creds and confirm I am logged in with a valid Keycloak session.

But, coming back to my .NET app, I get this error:

IDX10501: Signature validation failed. Unable to match key: kid: '2fd299de-d524-4435-9ac0-70d935ae63ac'. Number of keys in TokenValidationParameters: '0'. Number of keys in Configuration: '2'. Exceptions caught: '[PII of type 'System.Text.StringBuilder' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. token: '[PII of type 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.

Does this not support the latest packages?