18

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.

m3n7alsnak3
  • 3,026
  • 1
  • 15
  • 24
RocketRobin
  • 221
  • 2
  • 5
  • Please share your configuration code where you set up IdentityServer4 to use the SQL database. Second, include the code for the client where it tries to connect to IdentityServer4 and its configuration that you defined in the tables. – aaronR Dec 08 '17 at 18:07
  • 2
    I'm having the same issue.. Did you ever work out what was wrong with this? – Lex Webb Jan 12 '18 at 14:17

1 Answers1

35

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.

Marc Roelse
  • 95
  • 1
  • 12
Tilo
  • 605
  • 7
  • 15