title: Implement `Refresh Token` in `Angular`
body: <p>I'm working on this <code>Spring</code> Security <a href="https://github.com/dzinot/spring-boot-2-oauth2-authorization-jwt" rel="nofollow noreferrer">implementation</a> with <code>OAuth2</code> and <code>JWT</code>:</p>
  <p>According to the author I can access resources using token this way:</p>
  <blockquote>
  <p>To access a resource use (you'll need a different application which
  has configured ResourceServer): <code>http localhost:8080/users 'Authorization: Bearer '$ACCESS_TOKEN</code></p>
  </blockquote>
  <p>About this step:</p>
  <blockquote>
  <p>To use the refresh token functionality: <code>http --form POST adminapp:password@localhost:9999/oauth/token grant_type=refresh_token refresh_token=$REFRESH_TOKEN</code></p>
  </blockquote>
  <p>It's not clear for me that when I have to refresh the token and how can I handle this part into my <code>Angular</code> app.</p>
  <p><strong>Do I need to implement a timer which would refresh the token from time to time or is there another way to implement this functionality?</strong></p>