Overview
Per the Open ID Connect (OIDC) specifications, .NET applications will make a request to the /.well-known/openid-configuration endpoint to obtain the OIDC configuration. By default, .net core will cache the metadata endpoint for 12 hours.
This article will explain how to modify the length of time this information will be cached.
Applies To
- OIDC
- ASP.NET Core 5.0, 6.0, 7.0, 8.0, 9.0 Preview
Solution
The cache can be controlled using the automaticrefreshinterval on the OpenIdConnectOptions Class as described in the linked Microsoft .NET documentation.