npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@atroo/capacitor-secure-storage-plugin

v6.0.0

Published

Securely store secrets such as usernames, passwords, tokens, certificates or other sensitive information (strings) on iOS & Android

Downloads

356

Readme

@atroo/capacitor-secure-storage-plugin

Securely store secrets such as usernames, passwords, tokens, certificates or other sensitive information (strings) on iOS & Android

Compatibility

Since v5 we follow the versioning of Capacitor, which means v5 of this plugin can be used with Capacitor 5, while v6 can be used with Capacitor 6.

Install

npm install @atroo/capacitor-secure-storage-plugin
npx cap sync

Features

Android

This plugin uses EncryptedSharedPreferences to store sensitive information securely on any Android device. It will automigrate data from older versions after update.

iOS

When using set() you can specify a different accessibility modifier of the keychain to control, when access to a key should be allowed. Providing a different accessibility modifier on consecutive calls of set() for the same key, will remove the old key and create it new under the hood to prevent keychain errors.

Notes

Android

AutoBackup

To stay secure you need to handle the Auto Backup rules in Android. Please refer to this document.

Java 17

The plugin requires Java 17 to run. You can set it using the following options:

  • changing the IDE settings.
  • changing the JAVA_HOME environment variable.
  • changing org.gradle.java.home in gradle.properties.

API

The SecureStoragePlugin plugin interface

get(...)

get(options: { key: string; }) => Promise<{ value: string; }>

gets the value for the given key

| Param | Type | Description | | ------------- | ----------------------------- | -------------------- | | options | { key: string; } | key to get value for |

Returns: Promise<{ value: string; }>


getAccessibility(...)

getAccessibility(options: { key: string; }) => Promise<{ value: string | undefined; }>

gets the accessibility for the given key

| Param | Type | Description | | ------------- | ----------------------------- | ---------------------------- | | options | { key: string; } | key to get accessibility for |

Returns: Promise<{ value: string; }>


set(...)

set(options: SetDataOptions) => Promise<{ value: boolean; }>

sets the value for the given key

| Param | Type | Description | | ------------- | --------------------------------------------------------- | -------------------- | | options | SetDataOptions | key and value to set |

Returns: Promise<{ value: boolean; }>


remove(...)

remove(options: { key: string; }) => Promise<{ value: boolean; }>

removes the value for the given key

| Param | Type | Description | | ------------- | ----------------------------- | ----------------------- | | options | { key: string; } | key to remove value for |

Returns: Promise<{ value: boolean; }>


clear()

clear() => Promise<{ value: boolean; }>

clears all values

Returns: Promise<{ value: boolean; }>


keys()

keys() => Promise<{ value: string[]; }>

gets all keys

Returns: Promise<{ value: string[]; }>


getPlatform()

getPlatform() => Promise<{ value: string; }>

gets the platform

Returns: Promise<{ value: string; }>


Interfaces

SetDataOptions

allows to define how properties can be accessed on iOS

| Prop | Type | | ------------------- | ------------------------------------------------------- | | key | string | | value | string | | accessibility | Accessibility |

Type Aliases

Accessibility

allows to define how properties can be accessed on iOS

'afterFirstUnlock' | 'afterFirstUnlockThisDeviceOnly' | 'whenUnlocked' | 'whenUnlockedThisDeviceOnly' | 'always' | 'alwaysThisDeviceOnly' | 'whenPasscodeSetThisDeviceOnly'