title: keycloak javascript adapter request offline token
body: <p>I have js application for which I use keycloak 1.7-final JavaScript adapter with public client and standard flow and it works fine but now I wanted to add offline capability to the application and don't know how to get offline token. according to the <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/timeouts.html#offline-access" rel="nofollow">documentation</a> the client can request offline token by adding parameter "scope=offline_access" when sending authorization request to Keycloak.
  The thing is I don't know where to add the parameter. I tried to add to "keycloak.config" and "keycloak.init" but its not working.</p>
  
  <p>in keycloak.config:</p>
  
  <pre><code>keycloak: {
       url: 'link omitted',
       realm: 'sisdn-realm',
       clientId: 'sisdn',
       redirect_uri: 'link omitted',
       flow: 'standard',
       'enable-cors': true,
       scope: 'offline_access'
  }
  </code></pre>
  
  <p>and in keycloak.init</p>
  
  <pre><code>const keycloakConf = require('keycloak')//this is the same config above
  var keycloak = new  keycloakConf(config.keycloak)
  
  keycloak.init({
     onLoad: 'login-required',
     checkLoginIframe: false,
     scope: 'offline_access'
  })
  .success(authenticated =&gt; {
     if(!authenticated)
       dispatch(loginFailure())
     else {
       global.keycloak = keycloak
       dispatch(loginSuccess())
      }
   })
  </code></pre>