keychain-sync

access the mac keychain synchronously

Keychain-Sync

Access the mac keychain synchronously

First, add 'keychain-sync' to your package.json dependencies, or run:

npm install keychain-sync

Then use the following code:

 
keychainSync = require 'keychain-sync'
 
keychainSync.setPassword('myAccount''myService''12345')
 
keychainSync.getPassword('myAccount''myService')
# returns '12345' 
 
keychainSync.getPassword('myAccount''wrongService')
# returns null