keratin / authn-js

JavaScript client library for Keratin AuthN
GNU Lesser General Public License v3.0
45 stars 20 forks source link

implement LocalStorageSessionStore #7

Closed cainlevy closed 7 years ago

cainlevy commented 7 years ago

Adds a localStorage persistence option, available through the main.localstorage bundle.

LocalStorage is an appropriate persistence option for client-side applications that don't rely on server-side rendering to generate the first page load in a logged-in state. That only works with cookies, which provide ambient authentication.

The upside is that client-side apps relying on localStorage for persistence are not vulnerable to CSRF attacks, which exploit the ambient behavior of cookies.