Secure storage

In Ionic application, many developers heavily depends upon localStorage or SQLite via Cordova plugin. Many times we have to store secret such as usernames, passwords, tokens, certificates, or any other sensitive information, In this case we can use secure storage Native plugin which uses keychain to encrypt data in iOS and in Android this plugin encrypts data to store it in SharedPreference.  Inside an Ionic application, localStorage sandboxes the data only for your app. No, other application can access the data from outside, In case you are using SQLite as you application database, you can take advantage of SQLcipher plugin for encrypting the data inside SQLite:

$ ionic cordova:plugin add cordova-plugin-secure-storage$ npm ...

Get Hybrid Mobile Development with Ionic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.