If identityserver and the access token validation middleware are hosted in the same application there is a race condition at startup.
The validation middleware tries to load the discovery document, which is not yet available.
In these scenarios, set the DelayLoadMetadata
flag on the validation middleware to true.
If you disable the discovery endpoint altogether, you need to configure the issuer and key material on the validation options.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…