Skip to main content
Version: 5.0

Installation

Don't have an Identity Vault subscription? Try it free now.

Follow these steps to install Identity Vault into your app.'

Identity Vault Mimimum Requirements#

Your project must have the following to use Identity Vault.

  • Version >= 3.5 of typescript

Installation#

If you have not already setup Ionic Enterprise in your app, follow the one-time setup steps.

Next, install the plugin:

npm install @ionic-enterprise/identity-vaultnpx cap sync

Capacitor Requirements#

Update the info.plist file of the ios project to include the required Face ID Usage Description:

<key>NSFaceIDUsageDescription</key><string>Use Face ID to authenticate yourself and login</string>

Android SDK 30+. This is configured in the build.gradle file for Capacitor. Capacitor 2 and above is supported. If using Capacitor 3, ensure Capacitor dependencies are >=3.0.2.

Cordova Requirements#

cordova-android version 10 or later is required (which supports Android SDK 30 and above).

Swift 4.2 is in the minimum required version and can be specified by opening config.xml and below <platform name="ios"> specifying:

 <preference name="UseSwiftLanguageVersion" value="5" />

A suitable description is required to be displayed when Face ID is used for the first time. This can be specified by opening config.xml and below <platform name="ios"> adding the following line:

<config-file parent="NSFaceIDUsageDescription" platform="ios" target="*-Info.plist">    <string>Face ID is used to securely sign in.</string></config-file>

Configuring the Vault#

Identity Vault is created in your application by instantiating a new instance of the Vault class and passing a configuration object to it.

const vault = new Vault({  key: 'io.ionic.identityvaultdemo',});

Once the vault is created, you can call the various methods on it including lock and unlock to secure the vault and setValue and getValue to manage data in the vault.

await vault.unlock();await vault.getValue('myKey');await vault.setValue('myKey', 'newValue!');await vault.lock();