Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
Update README.md (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeuronButter committed Jul 19, 2021
1 parent 20650f9 commit a1bd440
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,11 @@ createPersistedState({ storage: window.sessionStorage });

This is especially useful when you are using this plugin in combination with server-side rendering, where one could pass an instance of [dom-storage](https://www.npmjs.com/package/dom-storage).

### 馃攼Encrypted Local Storage
### 馃攼Obfuscate Local Storage

If you need to use **Local Storage** (or you want to) but want to prevent attackers from easily stealing data, you can [obfuscate it]('https://github.com/softvar/secure-ls').


If you need to use **Local Storage** (or you want to) but needs to protect the content of the data, you can [encrypt it]('https://github.com/softvar/secure-ls').

[![Edit vuex-persistedstate with secure-ls (encrypted data)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vuex-persistedstate-with-secure-ls-encrypted-data-7l9wb?fontsize=14)

Expand All @@ -258,6 +260,9 @@ const store = new Store({
});
```

#### 馃毀 Important
Obfuscating the Vuex store means to prevent attackers from easily gaining access to the data. This is not a secure way of storing sensitive data (like passwords, personal information etc), and needs to be used in conjunction with some other authentication method of keeping the data (such as Firebase or your own server).

### 鈿狅笍 LocalForage 鈿狅笍

As it maybe seems at first sight, it's not possible to pass a [LocalForage](https://github.com/localForage/localForage) instance as `storage` property. This is due the fact that all getters and setters must be synchronous and [LocalForage's methods](https://github.com/localForage/localForage#callbacks-vs-promises) are asynchronous.
Expand Down

0 comments on commit a1bd440

Please sign in to comment.