---
description: Discover alternatives to the discontinued Ionic Secure Storage plugin with Capawesome SQLite and Secure Preferences for secure data storage.
title: Alternative to the Ionic Secure Storage Plugin - Capawesome
image: https://capawesome.io/docs/assets/images/social/blog/alternative-to-ionic-secure-storage-plugin.png
---

[ Skip to content](#alternative-to-the-ionic-secure-storage-plugin) 

[ 🔐 Introducing the **Capacitor Vault** plugin — store secrets behind biometrics or a device passcode.](/blog/announcing-the-capacitor-vault-plugin/) 

* [  SDKs ](/docs/sdks/)
* [  Formbricks ](/docs/sdks/capacitor/formbricks/)
* [  Geocoder ](/docs/sdks/capacitor/geocoder/)
* [  Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [  Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [  libSQL ](/docs/sdks/capacitor/libsql/)
* [  Live Update ](/docs/sdks/capacitor/live-update/)
* [  Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [  Media Session ](/docs/sdks/capacitor/media-session/)
* [  ML Kit ](/docs/sdks/capacitor/mlkit/)
* [  Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [  NFC ](/docs/sdks/capacitor/nfc/)
* [  OAuth ](/docs/sdks/capacitor/oauth/)
* [  Pedometer ](/docs/sdks/capacitor/pedometer/)
* [  Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [  PostHog ](/docs/sdks/capacitor/posthog/)
* [  Printer ](/docs/sdks/capacitor/printer/)
* [  Purchases ](/docs/sdks/capacitor/purchases/)
* [  RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [  Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [  Screenshot ](/docs/sdks/capacitor/screenshot/)
* [  Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [  Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [  Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [  Share Target ](/docs/sdks/capacitor/share-target/)
* [  Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [  SQLite ](/docs/sdks/capacitor/sqlite/)
* [  Superwall ](/docs/sdks/capacitor/superwall/)
* [  Torch ](/docs/sdks/capacitor/torch/)
* [  Vault ](/docs/sdks/capacitor/vault/)
* [  Wifi ](/docs/sdks/capacitor/wifi/)
* [  Zip ](/docs/sdks/capacitor/zip/)
* [  Cordova ](/docs/sdks/cordova/)
* [  Cloud ](/docs/cloud/)
* [  Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [  Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [  FAQ ](/docs/cloud/live-updates/faq/)
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Set Up Environments ](/docs/cloud/native-builds/environments/)
* [  Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [  Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [  Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [  Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [  Use pnpm or Yarn ](/docs/cloud/native-builds/package-managers/)
* [  Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [  Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [  Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [  Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [  Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [  Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  FAQ ](/docs/cloud/native-builds/faq/)
* [  App Store Publishing ](/docs/cloud/app-store-publishing/)
* [  Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [  Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [  Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [  FAQ ](/docs/cloud/app-store-publishing/faq/)
* [  Automations ](/docs/cloud/automations/)
* [  Reference ](/docs/cloud/automations/reference/)
* [  Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [  FAQ ](/docs/cloud/automations/faq/)
* [  Assist ](/docs/cloud/assist/)
* [  CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Integrations ](/docs/cloud/integrations/)
* Account
* [  Organization ](/docs/cloud/organizations/)
* [  Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [  Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [  Billing ](/docs/cloud/organizations/billing/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  AI ](/docs/ai/)
* [  Insiders ](/docs/insiders/)
* [  Billing & Plans ](/docs/insiders/billing-and-plans/)
* [  FAQ ](/docs/insiders/faq/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/support/)
* [  Contributing ](/docs/contributing/)
* Contributing code
* [  Code of Conduct ](/docs/contributing/code-of-conduct/)
* [  Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [  Blog ](/blog/)
* Categories

* [  SQLite ](#sqlite)
* [  Need Help Migrating? ](#need-help-migrating)
* [  Conclusion ](#conclusion)

* Related links

# Alternative to the Ionic Secure Storage Plugin[¶](#alternative-to-the-ionic-secure-storage-plugin "Permanent link")

Looking for a secure storage solution for your Capacitor app? With [Ionic discontinuing](https://ionic.io/blog/important-announcement-the-future-of-ionics-commercial-products) their commercial Secure Storage plugin, developers need reliable alternatives for encrypted data storage. The [Capawesome SQLite](/docs/sdks/capacitor/sqlite/) plugin and [Capawesome Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin provide modern, secure solutions that address the functionality gap left by Ionic Secure Storage.

[ ![Build and deploy your Capacitor app with Capawesome Cloud](../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](/) 

## Introduction[¶](#introduction "Permanent link")

Ionic Secure Storage has been a go-to solution for developers requiring encrypted local storage in their Capacitor applications. However, following Ionic's acquisition by OutSystems and their announcement to phase out commercial products, developers must find alternative solutions for secure data storage. The plugin offered both key-value storage and SQLite database functionality with 256-bit AES encryption, making it essential for applications handling sensitive data.

The [Capawesome SQLite](/docs/sdks/capacitor/sqlite/) plugin and [Capawesome Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin emerge as comprehensive alternatives, providing enterprise-grade security features while maintaining the functionality developers relied on with Ionic Secure Storage.

AI-Assisted Migration

For a more guided experience, add the [Capawesome skills](https://github.com/capawesome-team/skills) to your project with `npx skills add capawesome-team/skills --skill ionic-enterprise-sdk-migration` and use the following prompt with your preferred AI coding assistant:

`` [](#%5F%5Fcodelineno-0-1)Use the `ionic-enterprise-sdk-migration` skill from `capawesome-team/skills` to help me migrate from Ionic Secure Storage to Capawesome alternatives.
 ``

## Migration from Ionic Secure Storage[¶](#migration-from-ionic-secure-storage "Permanent link")

Migrating from Ionic Secure Storage requires choosing the appropriate replacement based on your storage needs: key-value storage or SQLite database functionality.

### Key-Value-Store[¶](#key-value-store "Permanent link")

For applications using Ionic Secure Storage's key-value functionality, migrate to the [Capawesome Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin.

#### Installation[¶](#installation "Permanent link")

Begin by removing the existing Ionic Secure Storage dependency and installing the Capawesome alternative, if you haven't already. To install the [Capawesome Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin, please refer to the [Installation](/docs/sdks/capacitor/secure-preferences/#installation) section in the plugin documentation.

#### Create a store[¶](#create-a-store "Permanent link")

Unlike Ionic Secure Storage, the Capawesome Secure Preferences plugin doesn't require explicit store creation. The secure storage is automatically available after installation and the encryption key is managed by the plugin itself, ensuring a seamless experience.

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-1-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-1-2)
[](#%5F%5Fcodelineno-1-3)const createStore = async () => {
[](#%5F%5Fcodelineno-1-4)  await KeyValueStorage.create('my-secret-key');
[](#%5F%5Fcodelineno-1-5)};
`

**Capawesome Secure Preferences:**

`[](#%5F%5Fcodelineno-2-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-2-2)
[](#%5F%5Fcodelineno-2-3)// No store creation needed - ready to use immediately
`

#### Set a value[¶](#set-a-value "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-3-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-3-2)
[](#%5F%5Fcodelineno-3-3)const setValue = async () => {
[](#%5F%5Fcodelineno-3-4)  await KeyValueStorage.set('username', 'john_doe');
[](#%5F%5Fcodelineno-3-5)};
`

**Capawesome Secure Preferences:**

`[](#%5F%5Fcodelineno-4-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-4-2)
[](#%5F%5Fcodelineno-4-3)const setValue = async () => {
[](#%5F%5Fcodelineno-4-4)  await SecurePreferences.set({
[](#%5F%5Fcodelineno-4-5)    key: 'username',
[](#%5F%5Fcodelineno-4-6)    value: 'john_doe'
[](#%5F%5Fcodelineno-4-7)  });
[](#%5F%5Fcodelineno-4-8)};
`

#### Get a value[¶](#get-a-value "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-5-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-5-2)
[](#%5F%5Fcodelineno-5-3)const getValue = async () => {
[](#%5F%5Fcodelineno-5-4)  const value = await KeyValueStorage.get('username');
[](#%5F%5Fcodelineno-5-5)  return value;
[](#%5F%5Fcodelineno-5-6)};
`

**Capawesome Secure Preferences:**

`[](#%5F%5Fcodelineno-6-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-6-2)
[](#%5F%5Fcodelineno-6-3)const getValue = async () => {
[](#%5F%5Fcodelineno-6-4)  const { value } = await SecurePreferences.get({ key: 'username' });
[](#%5F%5Fcodelineno-6-5)  return value;
[](#%5F%5Fcodelineno-6-6)};
`

#### Remove a value[¶](#remove-a-value "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-7-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-7-2)
[](#%5F%5Fcodelineno-7-3)const removeValue = async () => {
[](#%5F%5Fcodelineno-7-4)  await KeyValueStorage.remove('username');
[](#%5F%5Fcodelineno-7-5)};
`

**Capawesome Secure Preferences:**

`[](#%5F%5Fcodelineno-8-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-8-2)
[](#%5F%5Fcodelineno-8-3)const removeValue = async () => {
[](#%5F%5Fcodelineno-8-4)  await SecurePreferences.remove({ key: 'username' });
[](#%5F%5Fcodelineno-8-5)};
`

#### Clear the store[¶](#clear-the-store "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-9-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-9-2)
[](#%5F%5Fcodelineno-9-3)const clearStore = async () => {
[](#%5F%5Fcodelineno-9-4)  await KeyValueStorage.clear();
[](#%5F%5Fcodelineno-9-5)};
`

**Capawesome Secure Preferences:**

`[](#%5F%5Fcodelineno-10-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-10-2)
[](#%5F%5Fcodelineno-10-3)const clearStore = async () => {
[](#%5F%5Fcodelineno-10-4)  await SecurePreferences.clear();
[](#%5F%5Fcodelineno-10-5)};
`

### SQLite[¶](#sqlite "Permanent link")

For applications using Ionic Secure Storage's SQLite functionality, migrate to the [Capawesome SQLite](/docs/sdks/capacitor/sqlite/) plugin.

#### Installation[¶](#installation%5F1 "Permanent link")

Begin by removing the existing Ionic Secure Storage dependency and installing the Capawesome alternative, if you haven't already. To install the [Capawesome SQLite](/docs/sdks/capacitor/sqlite/) plugin, please refer to the [Installation](/docs/sdks/capacitor/sqlite/#installation) section in the plugin documentation.

#### Opening a database[¶](#opening-a-database "Permanent link")

Database initialization differs between the two solutions. Here's how to adapt your database setup:

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-11-1)import { SQLite } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-11-2)
[](#%5F%5Fcodelineno-11-3)const openDatabase = async () => {
[](#%5F%5Fcodelineno-11-4)  const db = await SQLite.create({
[](#%5F%5Fcodelineno-11-5)    name: 'database.db',
[](#%5F%5Fcodelineno-11-6)    location: 'default',
[](#%5F%5Fcodelineno-11-7)  });
[](#%5F%5Fcodelineno-11-8)  await db.executeSql('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)', []);
[](#%5F%5Fcodelineno-11-9)  return db;
[](#%5F%5Fcodelineno-11-10)};
`

**Capawesome SQLite:**

`[](#%5F%5Fcodelineno-12-1)import { Sqlite } from '@capawesome-team/capacitor-sqlite';
[](#%5F%5Fcodelineno-12-2)
[](#%5F%5Fcodelineno-12-3)const openDatabase = async () => {
[](#%5F%5Fcodelineno-12-4)  const { databaseId } = await Sqlite.open({
[](#%5F%5Fcodelineno-12-5)    path: 'database.db',
[](#%5F%5Fcodelineno-12-6)    upgradeStatements: [
[](#%5F%5Fcodelineno-12-7)      {
[](#%5F%5Fcodelineno-12-8)        version: 1,
[](#%5F%5Fcodelineno-12-9)        statements: [
[](#%5F%5Fcodelineno-12-10)          'CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)'
[](#%5F%5Fcodelineno-12-11)        ]
[](#%5F%5Fcodelineno-12-12)      }
[](#%5F%5Fcodelineno-12-13)    ]
[](#%5F%5Fcodelineno-12-14)  });
[](#%5F%5Fcodelineno-12-15)  return databaseId;
[](#%5F%5Fcodelineno-12-16)};
`

#### Executing SQL statements[¶](#executing-sql-statements "Permanent link")

SQL execution patterns are streamlined in the Capawesome SQLite plugin:

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-13-1)import { SQLiteObject } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-13-2)
[](#%5F%5Fcodelineno-13-3)const insertUser = async (db: SQLiteObject, name: string, email: string) => {
[](#%5F%5Fcodelineno-13-4)  await db.executeSql(
[](#%5F%5Fcodelineno-13-5)    'INSERT INTO users (name, email) VALUES (?, ?)',
[](#%5F%5Fcodelineno-13-6)    [name, email]
[](#%5F%5Fcodelineno-13-7)  );
[](#%5F%5Fcodelineno-13-8)};
`

**Capawesome SQLite:**

`[](#%5F%5Fcodelineno-14-1)import { Sqlite } from '@capawesome-team/capacitor-sqlite';
[](#%5F%5Fcodelineno-14-2)
[](#%5F%5Fcodelineno-14-3)const insertUser = async (databaseId: string, name: string, email: string) => {
[](#%5F%5Fcodelineno-14-4)  await Sqlite.execute({
[](#%5F%5Fcodelineno-14-5)    databaseId,
[](#%5F%5Fcodelineno-14-6)    statement: 'INSERT INTO users (name, email) VALUES (?, ?)',
[](#%5F%5Fcodelineno-14-7)    values: [name, email]
[](#%5F%5Fcodelineno-14-8)  });
[](#%5F%5Fcodelineno-14-9)};
`

#### Querying data[¶](#querying-data "Permanent link")

Data retrieval follows similar simplification patterns:

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-15-1)import { SQLiteObject } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-15-2)
[](#%5F%5Fcodelineno-15-3)const getUsers = async (db: SQLiteObject) => {
[](#%5F%5Fcodelineno-15-4)  return new Promise((resolve) => {
[](#%5F%5Fcodelineno-15-5)    db.transaction(tx => {
[](#%5F%5Fcodelineno-15-6)      tx.executeSql('SELECT * FROM users WHERE name LIKE ?', ['%John%'], (tx, result) => {
[](#%5F%5Fcodelineno-15-7)        resolve(result.rows);
[](#%5F%5Fcodelineno-15-8)      });
[](#%5F%5Fcodelineno-15-9)    });
[](#%5F%5Fcodelineno-15-10)  });
[](#%5F%5Fcodelineno-15-11)};
`

**Capawesome SQLite:**

`[](#%5F%5Fcodelineno-16-1)import { Sqlite } from '@capawesome-team/capacitor-sqlite';
[](#%5F%5Fcodelineno-16-2)
[](#%5F%5Fcodelineno-16-3)const getUsers = async (databaseId: string) => {
[](#%5F%5Fcodelineno-16-4)  const result = await Sqlite.query({
[](#%5F%5Fcodelineno-16-5)    databaseId,
[](#%5F%5Fcodelineno-16-6)    statement: 'SELECT * FROM users WHERE name LIKE ?',
[](#%5F%5Fcodelineno-16-7)    values: ['%John%']
[](#%5F%5Fcodelineno-16-8)  });
[](#%5F%5Fcodelineno-16-9)  return result.values;
[](#%5F%5Fcodelineno-16-10)};
`

## Need Help Migrating?[¶](#need-help-migrating "Permanent link")

If you'd rather not handle the migration yourself, the Capawesome team can take care of it for you. Whether you're dealing with a straightforward key-value store swap or a more complex SQLite setup, we offer dedicated migration services to get you up and running with minimal downtime and effort on your end.

[Book a Free Consultation](https://cal.com/team/capawesome/ionic-appflow-migration)

## Conclusion[¶](#conclusion "Permanent link")

The discontinuation of Ionic Secure Storage doesn't have to disrupt your development workflow. The [Capawesome SQLite](/docs/sdks/capacitor/sqlite/) plugin and [Capawesome Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin provide comprehensive alternatives that not only replace the functionality of Ionic Secure Storage but enhance it with modern architecture, better performance, and professional support.

By migrating to these Capawesome plugins, you gain access to actively maintained solutions that stay current with the latest Capacitor versions and platform updates, ensuring your applications remain secure and performant.

To stay updated with the latest updates, features, and news about Capawesome, Capacitor, and Ionic ecosystem, subscribe to the [Capawesome newsletter](/newsletter/) and follow us on [X (formerly Twitter)](https://x.com/capawesomeio).

If you need assistance with migrating from Ionic Secure Storage or implementing the [Capawesome SQLite](/docs/sdks/capacitor/sqlite/) or [Capawesome Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugins, the Capawesome team is available to help you transition smoothly to this reliable alternative. Just [contact us](mailto:support@capawesome.io) to get started.

June 8, 2026 

 Back to top 