title: Refreshing Keycloak offline token
body: <p>I am currently trying to get an offline token working with Keycloak. My problem here is, that I cannot refresh a token I once reveived..</p>
  
  <p>When I initially call the token endpoint, I get a proper response with a working access token:</p>
  
  <pre><code>{
    "access_token": "&lt;access-token&gt;",
    "expires_in": 900,
    "refresh_expires_in": 0,
    "refresh_token": "&lt;refresh-token&gt;",
    "token_type": "bearer",
    "not-before-policy": 1539890980,
    "session_state": "a178faf2-xxxx-xxxx-xxxx-fb16548b6805",
    "scope": "email profile offline_access"
  }
  </code></pre>
  
  <p>Then, I try to refresh the token using</p>
  
  <pre><code>curl -X POST \
    https://&lt;my-url&gt;/auth/realms/&lt;realm&gt;/protocol/openid-connect/token \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -H 'cache-control: no-cache' \
    -d 'client_id=&lt;client-id&gt;
    -d 'refresh_token=&lt;refresh-token&gt;
    -d 'grant_type=refresh_token'
  </code></pre>
  
  <p>I receive the following error:</p>
  
  <pre><code>{
    "error": "invalid_grant",
    "error_description": "Offline session not active"
  }
  </code></pre>
  
  <p>I looked at Keycloaks Jira issues and this doesn't seem to be a known issue. Can anyone help me getting the offline token running? Is there any special trick? Appreciate your help!</p>