1.1.0 • Published 1 year ago

native-keychain v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Node Native Keychain

GitHub package.json version npm npm GitHub GitHub Workflow Status

This is a TypeScript library to store and retrieve secure information from the macos keychain. It is a wrapper around the native keychain APIs on macOS built in Swift and bindings with Koffi.

Installation

npm install native-keychain

Usage

Note: For the moment, we only store Generic passwords in the keychain.

import * as keychain from 'native-keychain';

keychain.setPassword({ service: 'my-service', password: 'my-password' });

const secret = await keychain.getPassword({ service: 'my-service', requireBiometrics: true }); // 'my-password'

Available methods

MethodDescriptionOutput
getPasswordRetrieve a password from the keychain.Promise<string>
setPasswordStore a password in the keychain.void
deletePasswordDelete a password from the keychain.void
isBiometricsSupportedCheck if biometrics is supported.boolean
requestBiometricsVerificationRequest biometrics verification.Promise<boolean>

Maintainer

twitter/mikescops
Corentin Mors
1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago