title: How to send the JWT token to the client with feathersjs-authentication?
body: <p>I'm using <strong>local authentication</strong> in my <strong>feathersjs REST-API</strong> application, but after the user is authenticated, instead of sending me the <strong>authentication token</strong>, feathers is sending the following HTML as a response to the authentication request:</p>
  
  <pre><code>&lt;body&gt;
      &lt;img class="logo" src="alongbase64string" alt="Feathers Logo"&gt;
      &lt;main&gt;
          &lt;h1 class="center-text"&gt;Success&lt;/h1&gt;
          &lt;h3 class="center-text"&gt;You are now logged in. We've stored your JWT in a cookie with the name 
              &lt;span class="italic"&gt;"feathers-jwt"&lt;/span&gt; for you. It is:
          &lt;/h3&gt;
          &lt;pre id="token"&gt;&lt;/pre&gt;
      &lt;/main&gt;
      &lt;script type="text/javascript"&gt;
  function getCookie(name) {
    var value = "; " + document.cookie;
    var parts = value.split("; " + name + "=");
    if (parts.length == 2) return parts.pop().split(";").shift();
  }
  
  var token = getCookie('feathers-jwt');
  
  var el = document.getElementById('token');
  el.innerHTML = token;
  &lt;/script&gt;
  </code></pre>
  
  <p>which prints the following page:</p>
  
  <p><a href="https://i.stack.imgur.com/Vqv98.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vqv98.png" alt="enter image description here"></a>
      </p>
  
  <p>I think this would work good enough if I was sending the request from a web page, but in my case I need to get the token, because <strong>the client is a mobile app</strong>, not a web browser, so cookies won't work for me.</p>
  
  <p>Is it possible for me to make feathersjs send the token in the response? Something like:</p>
  
  <pre><code>{
      token: 'açldkjfaçldkfjçasdkfjdçakfjd'
  }
  </code></pre>
  
  <p>This way I could store the token in the mobile app, and <strong>use it to authenticate further requests</strong> to my feathersjs API server. </p>
  
  <p>For now I won't put any more code here, because the application was made entirely with the console commands available by feathersjs, like <code>feathers generate</code> but if anyone needs to understand more about the code, just let me know, and I will edit the question adding more details.</p>