title: Python authlib flask - how to handle refresh token?
body: <p>I only need oauth2 for login so far, but I feel that to be reasonably complete, my app should still handle refresh tokens.</p>
  <p>I'm fairly new to oauth, so here is my understanding:<br />
  By keeping access token lifetime short, but refresh token lifetime long, you force the client to &quot;check in&quot; regularly to renew the access token, and thereby maintain more control.</p>
  <p>But how to actually do that using authlib and the flask integration?<br />
  There seems to be no refresh_token() on the FlaskRemoteApp, and I have not been able to find any example code showing this.</p>
  <p>This seems to work to get a new token</p>
  <pre><code>res = oauth.myOauth2.fetch_access_token(refresh_token=session['tok_res']['refresh_token'])
  session['tok_res'].update(res)
  </code></pre>
  <p>But fails when subsequently using the new access_token for an api call.<br />
  Could be a server error I suppose, or maybe I need to wait for the old token to expire before using the new one? The expires_at time, keeps updating and that makes no sense to me in that case.</p>
  <p>It would be great if somebody could explain how refresh_token is intended to be used with authlib and flask.</p>