title: AddOpenIdConnect and Refresh Tokens in ASP.NET Core
body: <p>I have added <code>AddOpenIdConnect</code> to the <code>ConfigureServices</code> method of my ASP.NET Core 3.1 Razor application.  It works great until the token expires, then I get 401 responses from my IDP.</p>
  
  <p>I have seen an <a href="https://github.com/mderriey/aspnet-core-token-renewal/blob/master/src/MvcClient/Startup.cs" rel="noreferrer">example</a> that shows a way to wire up refresh tokens manually.</p>
  
  <p>But I am hesitant to do that.  It seems super unlikely that the folks at Microsoft did not think about refresh tokens.</p>
  
  <p><strong>Does ASP.NET Core 3.1 have a way to have refresh tokens automatically update the access token?</strong></p>