title: How to manage setting and storing a PIN in local storage in javascript-based application (phonegap)
body: <p>I'm building a Sencha Touch 2 application that retrieves data from a webservice. It's been decided that it'd be a good idea to use an optional PIN setting on the app for extra security when you launch the app from idle. I'm not really sure what the best way to manage this is. </p>
  
  <p>The web service isn't capable of storing the PIN itself, and the app is also designed to be used offline as well as online, so the number needs to be stored on the device itself in local storage. I'm not convinced this is providing any level of security, and I'm also concerned that on iOS local storage is apparently treated as temporary so setting the number in local storage doesn't necessarily mean it's always going to be there. </p>
  
  <p>The webservice already returns an expiring auth token to the device on which is required for all requests to the API. To my mind that's secure enough, but the idea of the PIN seems to be important to the client. </p>
  
  <p>How would you manage this requirement? </p>