<p>1) you cannot "secure" that data. You could encrypt it but that would be pointless as the encryption/decryption code would be open to the user as is all the other JS code of your app
2) if you don't want the session to be persisted you could either use the ephemeral store (in that case the session wouldn't survive a page reload though and you'd lose tab/window synchronization) or you could use the cookie based store which uses a session cookie by default that's deleted when the browser is closed. </p>
<p>This tip was originally posted on <a href="http://stackoverflow.com/questions/25988629/How%20to%20secure%20local%20storage%20and%20clear%20it%20on%20browser%20close%20in%20ember-simple-auth?/25989875">Stack Overflow</a>.</p>
Get New Tutorials Delivered to Your Inbox
New tutorials will be sent to your Inbox once a week.