Closed antonio-petrov closed 5 years ago
By the error message it looks like you encountered a similar problem as I had. If the Keycloak server is version 4.5 and you are using the latest version of the library you could try setting the option
KeycloakAuthenticationOptions.DisableRefreshTokenSignatureValidation = true
What the fix does is described here https://github.com/mattmorg55/Owin.Security.Keycloak/pull/9
Thank you, it appears that I have downloaded the library just before your commit that fixes the problem. This resolved my issue.
Problem:
I keep getting an error saying that
IDX10501: Signature validation failed. Unable to match 'kid':
when I try to log in. If I enter WRONG credentials I get an error that the login is unsuccessful, however when I enter the correct credentials, I get that error.Whole Error:
What I have tried:
I have downloaded the sample project and I have edited the settings in the Startup.cs, I keep getting the error described above.
I have tried both running the project on my computer using Visual Studio 2017 and publishing the project and using it on my local IIS. Both methods lead to the same result.
I have also tried to activate the user registration. The registration works by creating the user (I can see it through the admin panel), however I still get the same error (I assume after being redirected).
I have tried debugging the project using the sample project and noticed that it fails on the third call of the method
var jwt = ValidateSignature(securityToken, validationParameters);
.This is what my Startup class looks like at the moment:
Realm settings:
Realm keys:
Client credentials:
Client settings: