title: How to use existing server token with emberjs simple auth
body: <p>I'm currently implementing this library <a href="https://github.com/simplabs/ember-simple-auth" rel="nofollow">ember-simple-auth</a> to manage authentication in the emberjs application (shopping cart) that I am currently building. </p>
  
  <p>The difficulty that I encounter is that the library manages authentication rules after logging in very well but not before logging in.</p>
  
  <p>So here is the scenario:
  The application must talk to the backend server to retrieve a session token for every user. This is necessary so that the user can save their items temporarily in the server side using session data. Something that you would expect for a shopping cart.</p>
  
  <p>Then when the user is ready to move forward the application will then display the login screen and the user can authenticate themselves to checkout their items.</p>
  
  <p>However, I can't seems to figure out yet how to do this using simple-auth. If I create a custom authenticator that just fetches token id from the server, it will mark the session as authenticated and will not ask for login on the authenticatedRoute. </p>
  
  <p>In general what I'm trying to do are:</p>
  
  <ol>
  <li>Customer visit the website</li>
  <li>The application fetches session token from the server</li>
  <li>Customer clicks around and saves item into the shopping cart. The data is synced with the server using the session token</li>
  <li>Customer ready to checkout and navigates to checkout page</li>
  <li>The application intercepts the route and redirect the customer to login route, where the customer can login and resume checkout.</li>
  </ol>
  
  <p>I hope the above information is clear enough. Any hints and help will be much appreciated. Thanks.</p>