Skip to content

Commit f3bcff6

Browse files
authored
docs(preferences): clarify that stored data is unencrypted and point to secure alternatives
Adds a short note to the Preferences README clarifying that data stored through this API is not encrypted, and points readers to an encrypted key/value alternative for sensitive data.
1 parent 0bfde98 commit f3bcff6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

preferences/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on Android. Stored data is cleared if the app is uninstalled.
1616
stores a lot of data, has high read/write load, or requires complex querying,
1717
we recommend taking a look at a SQLite-based solution. One such solution is [Ionic Secure Storage](https://ionic.io/docs/secure-storage), a SQLite-based engine with full encryption support. The [Capacitor Community](https://github.com/capacitor-community/) has also built a number of other storage engines.
1818

19+
Also note that data stored with this API is _not_ encrypted: it is persisted via `UserDefaults` on iOS and `SharedPreferences` on Android, both of which store values in plain text. For sensitive values such as tokens or credentials, consider an encrypted key/value solution such as the [Capawesome Secure Preferences](https://capawesome.io/docs/sdks/capacitor/secure-preferences/) plugin, which encrypts values using the Android Keystore and iOS Keychain.
20+
1921
## Install
2022

2123
```bash

0 commit comments

Comments
 (0)