title: Authentication in React/Redux application
body: <p>I'm relatively new to <strong>redux</strong> and basically to the concept, where front-end separated from back-end. Earlier, i used <strong>laravel</strong> and <strong>RoR</strong> frameworks, where you can actually combine front-end and back-end logic and access back-end code in views. With this approach, it's easy to handle authentication, because frameworks i mentioned above have sessions middleware which gives the possibility to retrieve authenticated user data even after page refresh.</p>
  
  <p>Things changed when you're working with redux. I understand the part <strong>how</strong> to authenticate the user (basically send <code>POST</code> request and write data to the store), but how can i handle page refresh, so all the data gets reset by initial state of reducers?</p>
  
  <p>Seems to me that the only way out is to store authenticated user in the localStorage and if it's presistent there - make it an initial state of reducer? Is it safe? Or maybe there are some best practices about this approach?</p>
  
  <p><strong>[IMPORTANT] Few words about my back-end logic:</strong></p>
  
  <p>I'm using laravel as a back-end (which basically renders react view with router, where all of the front-end logic are, <strong>if</strong> <code>url</code> doesn't starts with <strong>/api</strong>).</p>
  
  <p>I'm <strong>not</strong> using <strong>JWT</strong> or any token approaches, because i have access to all the default middlewares, which gives me possibility to send request with the user data and get <strong>session</strong> identifier as cookies (so each ajax request from react\redux app gets automatically authenticated by laravel).</p>