<div dir="ltr">Well yes there is an ugly workaround :) , in your node_modules/keycloak-connnect/index.js at line 304 , you can replace openid with offline_access<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 12:39 PM, sheishere b <span dir="ltr">&lt;<a href="mailto:sheishere48@gmail.com" target="_blank">sheishere48@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is there some workaround ? Is it possible to override the login url &amp; replace &quot;scope=openid&quot; to &quot;scope=offline&quot; ?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 2:39 PM, sheishere b <span dir="ltr">&lt;<a href="mailto:sheishere48@gmail.com" target="_blank">sheishere48@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok, thanks.<div>It would be great if you could create jira &amp; share the information. </div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 2:03 PM, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:sblanc@redhat.com" target="_blank">sblanc@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I just made some tests and looked at the nodejs adapter code, it doesn&#39;t look like it supports offline_access since it&#39;s hardcoded to &quot;scope=openid&quot; ( <a href="https://github.com/keycloak/keycloak-nodejs-connect/blob/master/index.js#L304" target="_blank">https://github.com/keycloak/ke<wbr>ycloak-nodejs-connect/blob/mas<wbr>ter/index.js#L304</a> ).<br><br></div>Fix would be quite simple since we have access to the original url query parameters through the redirectUrl parameter of the function. <br><br></div>I can create a jira for this. <br><br> <br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 9:43 AM, Stian Thorgersen <span dir="ltr">&lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Do we support offline_access param in Node.js adapter?</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 31 August 2016 at 09:11, Marek Posolda <span dir="ltr">&lt;<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>It depends if keycloak-nodejs adapter
      has some nice support for &quot;inject&quot; the custom value of scope
      parameter into the initial Keycloak login ( AuthorizationEndpoint
      ) URL.<br>
      <br>
      Our java adapter has support for it, as it &quot;forwards&quot; the value of
      scope parameter from the secured URL to the Keycloak login URL.
      For example if you open
      <a href="http://localhost:/yourapp/secured?scope=offline_access" target="_blank">&quot;http://localhost:/yourapp/sec<wbr>ured?scope=offline_access&quot;</a>, the
      adapter forwards the &quot;scope=offline_access&quot; to the Keycloak. Our
      keycloak.js adapter also has support for adding custom scope.
      However not really sure about keycloak-nodejs-connect.<br>
      <br>
      Maybe either someone more familiar with keycloak nodeJS adapter
      will reply. Or you can try to dig yourself and eventually create
      JIRA (or even better send PR) for adding the missing
      functionality.<br>
      <br>
      Marek<div><div><br>
      <br>
      On 30/08/16 11:51, sheishere b wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div>
      <div dir="ltr">
        <div>Hello,</div>
        <div><br>
        </div>
        <div>From nodejs, I am trying to integrate with keycloak server.</div>
        <div>Have followed the steps mentioned in <a href="https://github.com/keycloak/keycloak-nodejs-connect" target="_blank"></a><a href="https://github.com/keycloak/keycloak-nodejs-connect" target="_blank">https://github.com/keycloak/ke<wbr>ycloak-nodejs-connect</a> </div>
        <div>But I need to use offline access to generate offline token
          as mentioned here, <a href="https://keycloak.gitbooks.io/server-adminstration-guide/content/v/2.1/topics/sessions/offline.html" target="_blank">https://keycloak.gitbooks.io/s<wbr>erver-adminstration-guide/cont<wbr>ent/v/2.1/topics/sessions/offl<wbr>ine.html</a> </div>
        <div>How can this be done from nodejs?</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
keycloak-user mailing list
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a></pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>