keytar
Bindings to Mac OS X Keychain
Last updated 12 years ago by kevinsawicki .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install keytar 
SYNC missed versions from official npm registry.

keytar - Node module to manage system keychain

Travis Build Status Windows Build Status Dependency Status

A native Node module to get, add, replace, and delete passwords in system's keychain. On macOS the passwords are managed by the Keychain, on Linux they are managed by the Secret Service API/libsecret, and on Windows they are managed by Credential Vault.

Installing

npm install keytar

On Linux

Currently this library uses libsecret so you may need to install it before running npm install.

Depending on your distribution, you will need to run the following command:

  • Debian/Ubuntu: sudo apt-get install libsecret-1-dev
  • Red Hat-based: sudo yum install libsecret-devel
  • Arch Linux: sudo pacman -S libsecret

Building

  • Clone the repository
  • Run npm install
  • Run npm test to run the tests

Supported versions

Each release of keytar includes prebuilt binaries for the versions of Node and Electron that are actively supported by these projects. Please refer to the release documentation for Node and Electron to see what is supported currently.

Bindings from other languages

Docs

const keytar = require('keytar')

Every function in keytar is asynchronous and returns a promise. The promise will be rejected with any error that occurs or will be resolved with the function's "yields" value.

getPassword(service, account)

Get the stored password for the service and account.

service - The string service name.

account - The string account name.

Yields the string password or null if an entry for the given service and account was not found.

setPassword(service, account, password)

Save the password for the service and account to the keychain. Adds a new entry if necessary, or updates an existing entry if one exists.

service - The string service name.

account - The string account name.

password - The string password.

Yields nothing.

deletePassword(service, account)

Delete the stored password for the service and account.

service - The string service name.

account - The string account name.

Yields true if a password was deleted, or false if an entry with the given service and account was not found.

findCredentials(service)

Find all accounts and password for the service in the keychain.

service - The string service name.

Yields an array of { account: 'foo', password: 'bar' }.

findPassword(service)

Find a password for the service in the keychain. This is ideal for scenarios where an account is not required.

service - The string service name.

Yields the string password, or null if an entry for the given service was not found.

Current Tags

  • 6.0.0-beta.2                                ...           beta (5 years ago)
  • 7.9.0                                ...           latest (3 years ago)

77 Versions

  • 7.9.0                                ...           3 years ago
  • 7.8.0                                ...           3 years ago
  • 7.7.0                                ...           4 years ago
  • 7.6.0                                ...           4 years ago
  • 7.5.0                                ...           4 years ago
  • 7.4.0                                ...           4 years ago
  • 7.3.0                                ...           4 years ago
  • 7.2.0                                ...           4 years ago
  • 7.1.0                                ...           4 years ago
  • 7.0.0                                ...           4 years ago
  • 6.0.1                                ...           5 years ago
  • 6.0.0                                ...           5 years ago
  • 6.0.0-beta.2                                ...           5 years ago
  • 6.0.0-beta.1                                ...           5 years ago
  • 6.0.0-beta.0                                ...           5 years ago
  • 5.6.0                                ...           5 years ago
  • 5.5.0                                ...           5 years ago
  • 5.4.0                                ...           5 years ago
  • 5.3.0                                ...           5 years ago
  • 5.2.0                                ...           5 years ago
  • 5.1.0                                ...           5 years ago
  • 5.0.0                                ...           5 years ago
  • 5.0.0-beta.5                                ...           5 years ago
  • 5.0.0-beta.4                                ...           5 years ago
  • 5.0.0-beta.3                                ...           5 years ago
  • 5.0.0-beta.2                                ...           5 years ago
  • 5.0.0-beta.1                                ...           5 years ago
  • 5.0.0-beta.0                                ...           5 years ago
  • 4.13.0                                ...           5 years ago
  • 4.12.0                                ...           5 years ago
  • 4.11.0                                ...           5 years ago
  • 4.10.0                                ...           5 years ago
  • 4.9.0                                ...           6 years ago
  • 4.8.0                                ...           6 years ago
  • 4.7.0                                ...           6 years ago
  • 4.6.0                                ...           6 years ago
  • 4.5.0                                ...           6 years ago
  • 4.4.2                                ...           6 years ago
  • 4.4.1                                ...           6 years ago
  • 4.4.0                                ...           6 years ago
  • 4.3.3                                ...           6 years ago
  • 4.3.2                                ...           6 years ago
  • 4.3.1                                ...           6 years ago
  • 4.3.0                                ...           6 years ago
  • 4.2.1                                ...           7 years ago
  • 4.2.0                                ...           7 years ago
  • 4.1.0                                ...           7 years ago
  • 4.0.5                                ...           7 years ago
  • 4.0.4                                ...           7 years ago
  • 4.0.3                                ...           8 years ago
  • 4.0.2                                ...           8 years ago
  • 3.0.2                                ...           9 years ago
  • 3.0.1                                ...           9 years ago
  • 3.0.0                                ...           9 years ago
  • 2.1.0                                ...           10 years ago
  • 2.0.3                                ...           10 years ago
  • 2.0.2                                ...           10 years ago
  • 2.0.1                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
  • 0.15.1                                ...           11 years ago
  • 0.15.0                                ...           11 years ago
  • 0.14.0                                ...           11 years ago
  • 0.13.0                                ...           11 years ago
  • 0.12.0                                ...           11 years ago
  • 0.11.0                                ...           11 years ago
  • 0.10.0                                ...           11 years ago
  • 0.9.0                                ...           12 years ago
  • 0.8.0                                ...           12 years ago
  • 0.7.0                                ...           12 years ago
  • 0.6.0                                ...           12 years ago
  • 0.5.0                                ...           12 years ago
  • 0.4.0                                ...           12 years ago
  • 0.3.0                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Downloads
Today 0
This Week 0
This Month 25
Last Day 0
Last Week 25
Last Month 0
Dependencies (1)
Dev Dependencies (6)

Copyright 2013 - present © cnpmjs.org | Home |