title: How to secure localstorage? Offline access to app
body: <p>There is a lot of topics about localstorage and how to secure it but i didnt found 100% offline solution(I dont know if its even possible). </p>
  
  <p>My app is using ionic framework + ng-token-auth + devise-token-auth.</p>
  
  <p>I have authentication stuff in it.</p>
  
  <p>All I really want to store in localstorage are photos but those photos belongs to particular user... </p>
  
  <p>I want to make my app working offline also, so my idea is to create localPassword value(random) in registration procedure and then return this value to the client-side and save it locally.</p>
  
  <p>I will use that value to encode photos using AES encryption(propably forge) and store this value locally. This value will be updating on every sign_in() procedure and it will be destroyed at sign_out().</p>
  
  <p>In case when internet connection will be lost and authentication will be unable than I open my app and show decoded photos using this localPassword, that are belonging to the last logged user.</p>
  
  <ol>
  <li>Should I care about that kind of stuff -Decoding enconding photos or should I just show photos of last logged user</li>
  <li>Does it even make sense ? I want to make accessing photos difficult outside the app and I want to make my app working offline(offering little functionality of adding/editing photos)</li>
  </ol>
  
  <p>sorry for bad english, thanks for any advice !</p>