title: Identity Server still including in-memory keys in discovery doc after providing custom implementation of ISigningCredentialStore
body: <p>I'm working on an app that uses the <a href="https://github.com/DuendeSoftware/IdentityServer" rel="nofollow noreferrer">IdentityServer6 library</a>. Out of the box this seems to use a pair of in-memory signing keys which I can see in the jwks discovery doc when run locally.</p>
  <p>I've now provided a custom implementation of <code>ISigningCredentialStore</code> and <code>IValidationKeysStore</code> to load my own key pair from an external source. These I've registered as <a href="https://docs.identityserver.io/en/latest/topics/crypto.html" rel="nofollow noreferrer">per the docs</a> like this:</p>
  <pre><code>builder.Services.AddSingleton&lt;ISigningCredentialStore, MySigningCredentialStore&gt;();
  builder.Services.AddSingleton&lt;IValidationKeysStore, MyValidationKeysStore&gt;();
  </code></pre>
  <p>However, when I run this I now get the original pair of keys, <strong>plus</strong> my own two in the discovery doc, so four in total. So how can I stop IdentityServer using its own keys?</p>