title: Authentication in Ionic/Cordova App
body: <p>First off, I'm no pro.</p>
  
  <p>In my quest to become a better developer I am trying to understand what is needed and how to accomplish creating a sign-up/login for an Ionic-Framework app.</p>
  
  <p>Most of the single-page-applications (SPAs) handle authentication on a node server that is also serving up the HTML for the client. In my case the phone itself will be serving up the HTML so I am guessing I may be going up against some CORs issues.</p>
  
  <p>I understand that the Ionic-Framework uses states and based <a href="https://github.com/fnakstad/angular-client-side-auth">angular-client-side-auth</a> repo I should be authenticating whenever I am changing states in my app.</p>
  
  <p>I have an initial app setup but now I am kind of confused where to go from here.</p>
  
  <p>The tools I have at my disposal:</p>
  
  <ul>
  <li>Node.JS Server -Thanks DigitalOcean (Should I be using this as a proxy to my DB?)</li>
  <li>CouchDB server (Full stack here we come)</li>
  </ul>
  
  <p><strong>Questions of mine:</strong></p>
  
  <ol>
  <li>What is the standard approach for authenticating when using hybrid apps?</li>
  <li>Should I be using Node.JS as a proxy to the database?</li>
  <li>Should I skip node.js and authenticate directly with the CouchDB server? (I've heard of this)</li>
  <li>Am I going about this all the wrong way?</li>
  <li>What are my potential road-blocks? </li>
  <li>How does CORS work with hybrid applications?</li>
  <li>Anything I'm missing?</li>
  </ol>
  
  <p>Thanks for helping me become a better developer.</p>