Closed sshiercir2 closed 3 years ago
Your app might be using custom keys. Could you try the MetadataAddress: https://cir2advisorstst.b2clogin.com/tfp/cir2advisorstst.onmicrosoft.com/B2C_1A_Signin_OpenID/v2.0/.well-known/openid-configuration?appid=<your-app-id>
(replacing the value with your application appId)?
Tiago:
I tried that using our Azure client id for the
That is interesting. If you decode the JWT Token on https://jwt.ms/ , would the KID
claim be the same value that you get from your key endpoint on your MetadataAddress?
Tiago: KID has the same value.
@sshiercir2 is the authority in your app the same as the issuer?
@jmprieur The issuer in my metadata was not the same as the authority. I made them the same by changing the authority and the result is the same IDX10501 error.
@sshiercir2 did you clear the cache of your client?
Yes cache was cleared, also run in Chrome dev tools with disable cache checked. Ran incognito as well. Error occurs all the time.
@sshiercir2 : please have a look at https://github.com/Azure-Samples/active-directory-dotnet-webapi-manual-jwt-validation which explains how to do the manual validation (which you are doing)
Proposing to close this issue as I believe I've answered, but feel free to reopen if you disagree.
We have a problem with token validation in our test system. We are using the OWIN middleware in OpenID connect.
The code we have was originally based off https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi .
The code has since been modified and customized and is in a .NET 4.6.1 MVC app.
We are getting SecurityTokenInvalidSignatureExceptions with the message "IDX10501 occurs here with this message: Signature validation failed. Unable to match keys: ..." The keys do match though.
We have discussed this with Microsoft and they have indicated to us that Azure settings are correct and that the error is likely occurring in the OWIN middleware.
Our config settings are as follows:
Here are some of the config settings:
Our token validation in Startup.cs looks like this:
Our configuration method looks like this:
How can we prevent this SecurityTokenInvalidSignatureException?
Thanks, Steve