Search code examples
asp.net-identityidentityserver4jwk

Migration to IdentityServer 4.1 and IDX10501 error


I'm currently trying a migration from IdentityServer 3.x to 4.1.1, and I have followed this migration guide:

https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0

The problem is that I got an IDX10501 error now, please have a look at the full log here: https://github.com/abpframework/abp/issues/7452

My "old" tempkey.rsa files are still there but new files are generated "tempkey.jwk".

So, do you think it is related? and how can I change this?

At the end, my goal is just to fix this IDX10501 error... any idea is welcome.


Solution

  • Tempkey.jwk is generated by this command

    builder.AddDeveloperSigningCredential();
    

    and this is fine for development but not in production.

    The error you get is that the key is not found in the JWKS endpoint. You need to use the AddSigningCredential method to add your old key as the signing key.

    The kid claim found in the tokens must match what you see from the /.well-known/openid-configuration/jwks endpoint.