Secure Storage

Contents

This plugin gets, sets and removes key,value pairs from a device's secure storage.

https://github.com/Crypho/cordova-plugin-secure-storage

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add cordova-plugin-secure-storage npm install @ionic-native/secure-storage
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic activate-native-ee --key=YOURPRODUCTKEY ionic integrations add @ionic-native/secure-storage

Supported Platforms

  • Android
  • Browser
  • iOS
  • Windows

Usage

import { SecureStorage, SecureStorageObject } from '@ionic-native/secure-storage/ngx';

constructor(private secureStorage: SecureStorage) { }

...

this.secureStorage.create('my_store_name')
  .then((storage: SecureStorageObject) => {

     storage.get('key')
       .then(
         data => console.log(data),
         error => console.log(error)
     );

     storage.set('key', 'value')
       .then(
        data => console.log(data),
         error => console.log(error)
     );

     storage.remove('key')
     .then(
         data => console.log(data),
         error => console.log(error)
     );

  });