Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Identity Server 4 error "keyset is missing"

After I config EntityFramework the code not working, I just did like the doc int this page identity server 4 official doc

Just like the doc say at the last of page "You should now be able to run any of the existing client applications and sign-in, get tokens, and call the API – all based upon the database configuration.". But when I run the console application i see the following error ,no matter that the server info looks OK, this is the discovery document.I'm sure that I start the Server before Client. I can't find out reason or something related on the google and Stack Overflow. I want to know what is the meaning of "key set missing", and how to fix it.

like image 480
RocketRobin Avatar asked Dec 08 '17 07:12

RocketRobin


1 Answers

Did you add the following?

public void ConfigureServices(IServiceCollection services)
{
    services.AddIdentityServer()
            .AddDeveloperSigningCredential()....
}

I got the following Error when this is not added.

System.InvalidOperationException: Policy error while contacting the discovery endpoint http://localhost:5050/.well-known/openid-configuration: Keyset is missing
       at IdentityModel.AspNetCore.OAuth2Introspection.PostConfigureOAuth2IntrospectionOptions.<GetIntrospectionEndpointFromDiscoveryDocument>d__3.MoveNext() 

Very annoying that this is never documented.

P.S. you have to restart your Client before testing it. The client call's the discovery only once.

like image 172
Tilo Avatar answered Nov 03 '22 16:11

Tilo