Ionic Secure Storage provides a powerful SQLite-backed data store, but SQLite is not available in a standard browser environment, so apps that must run on iOS, Android, and the web, have to take a slightly different approach to enable web support.
In this case, web support is provided by the companion
@ionic/storage utility which provides a generic storage API that works across multiple platforms, abstracting away storage engine details and providing a simple API with low overhead.
One trade-off is this requires apps to use a key/value API instead of the SQL API for cross-platform support, which is an acceptable compromise for many apps. Optionally, apps may elect to use the SQL engine when running natively on iOS and Android, but fall back to using the key/value API provided in
@ionic/storage when running on the web.
View Ionic Storage installation instructions on the Key/Value page.
For general web support usage, see the Ionic Storage docs.
It's recommended to create a Service that encapsulates all storage logic. Call an initialization function in the constructor. Within the function, define the Ionic Secure Storage driver, then set the encryption key before calling