@postman/node-keytar
TypeScript icon, indicating that this package has built-in type declarations

7.9.3 • Public • Published

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.

Package Sidebar

Install

npm i @postman/node-keytar

Weekly Downloads

1,377

Version

7.9.3

License

MIT

Unpacked Size

47.5 kB

Total Files

14

Last publish

Collaborators

  • jacob.zeba
  • steven.tan
  • ssharad
  • vishwas-rawat9
  • kseniia.lukova
  • rishavbharti-postman
  • brekk.bockrath
  • dylanglennpostman
  • akarshts007
  • ankitesh
  • post-abhigyan
  • aravindrajr
  • arpitsuman601
  • nelly_ghazaryan
  • eeror
  • gopikrishna.s
  • yashasvi13
  • dylansd
  • vivek.nigam
  • kundan.kumar09
  • soumya.agarwal.postman
  • dashrath.yadav
  • ayush.shrivastav
  • souris.ash
  • prateek.postman
  • amaldinesh7
  • tree6789
  • saifali_postman
  • andrusyshyn
  • adarsh.agrawal
  • ekam.walia
  • abhishekpostman
  • nabeel.n
  • vasudha.madugula
  • jj.liu
  • saksham-postman
  • mmocarski
  • postman-maddie
  • yashkumark
  • igor-fesenko-postman
  • khudadad.nomani
  • aris.villareal
  • praveen.thirumurugan
  • amit-gp
  • chowwinstonpostman
  • harsh.poddar
  • matthew.pinsker
  • animesh.jajoo
  • nimish.agrawal
  • karan-chawla1
  • yash.gupta007
  • josh-postman
  • choowon.sir
  • christianareas-postman
  • tch-postman
  • vaibhaw.kumar
  • abhishek_postman
  • soumadeep.acharya
  • aquibjr-postman
  • krishna-postman
  • alex.morton
  • salilgupta_postman
  • steeve.bete
  • zubair.lawrence
  • mxdavis
  • mxdavis-postman
  • shy.alter.postman
  • eric-postman
  • dmytro.markov
  • abhishek.pawar
  • abhishek.raj87
  • eddie.davies
  • shubham.shukla-postman
  • basile.barrincio
  • hoanguyenn
  • shreyansh.goyal
  • harikrishna.postman
  • sajal001
  • dima-postman
  • ihor.mariichyn
  • andrii.lymych
  • michael.browning
  • yevhenii.stepanov
  • akshat-nema
  • postman-web-platform-functional-account
  • ian.cundiff
  • rebecca.krosnick
  • soriat
  • meetsuraj2
  • nitish-postman
  • shub_postman
  • joshnedelkapostman
  • kevin.corbett
  • carlos.garcia.postman
  • anirudh.ms
  • akira28
  • cecilytoro
  • sumedha.kulkarni
  • suman.das
  • yashishdua
  • rljohnsn
  • salomekbg_postman
  • vtyson
  • indraneel_postman
  • grantkingpostman
  • shivangibajpai12
  • abhilash-postman
  • raghavendra-postman
  • ravi-postman
  • jedliu-postman
  • amaan.khan.postman
  • diwakarshukla_postman
  • imran.munir
  • markgritterpm
  • shruthivee
  • aki-kusanagi
  • yokawasa
  • ankit834
  • saurabh.agarwal
  • itsaamirpostman
  • postmanaut
  • noah.schwartz
  • dkrape
  • saurabh.vartak
  • wheatspaghetti
  • himanshu.ng056
  • honeynair
  • tonyzebastian
  • parthverma
  • neha.kaura
  • josephps
  • parthpverma
  • muskaan06
  • akshay_postman
  • jeroenvdpoll
  • harsuyash
  • ayush.chowdhury
  • plgah
  • sobtiankit
  • smoya
  • mcturco
  • skatikia
  • dhinesh.sridhar
  • aman-pm
  • alexgul4enko
  • pamzani
  • guru.pochineni
  • navneetbhole
  • piyush.daga
  • himanshu.vishwakarma
  • shraddha-arora-postman
  • anshitbansal
  • prathameshh
  • nitishpostman
  • yashja.in
  • varshini59
  • aviralpostman
  • theerthasenan
  • shikharpostman
  • amanpostman
  • greenblade29
  • anuragmewar
  • chris_pm
  • jk-postman
  • tphipps
  • akshay.kulkarni
  • vedkribhu
  • samarth.gulati
  • razvi07
  • cleverom
  • planetabhi
  • tiara.johnson
  • joe.fusco
  • jonathanhaviv
  • mudit.joshi
  • piyush.r
  • anjali2022
  • gkorosc-postman
  • raisinten
  • itsaamir
  • vinayak.parashar
  • rafaeltf
  • apoorv.gupta.postman
  • adrian.santana
  • kylerrenn94
  • jelle.vandevelde
  • atanas.a
  • samithjaganath
  • pranavj2000
  • pwitcher
  • anandh619
  • diegog24
  • kevinswiber-postman
  • sanketpath
  • opi-danihelka
  • arvind.khadri
  • cboornazian
  • irena-postman
  • rohan.grover
  • vincentbarth
  • aniketbewal
  • romulo-nascimento
  • ruben.baraut
  • arsh_13
  • rtlockwood
  • harshit.kochar
  • auddypostman
  • patricksevat
  • akinard-pm
  • laszlogreczi
  • bhoomikaduapostman
  • roy-himanshu
  • nidhi_goyal
  • alexander-rubia
  • arjun.golabhanvi
  • anil.jnanoji
  • gbadebo.bello
  • jatin-postman
  • bharadwajpoduri7
  • liteshpatil17
  • tilak-patel-postman
  • hasnain.rajan
  • elizabeth.fung
  • preetham.m
  • dhuhindhan.ilango
  • nishat.sayyed
  • rubencasas
  • sterling.chin-postman
  • anubhav-vats
  • timhall
  • asutosh.sahoo
  • prasant.patel
  • bot_marketing_engineering
  • shreyansh_post
  • vaishnavichalla
  • lorenzo.ambrosi
  • arnaudlauret_postman
  • christina.hastenrathplus1
  • postman-dakshraj.sharma
  • ekansh-01
  • devsharma
  • ayushman9454
  • tonygo
  • postmanian
  • davidtran33
  • akkeshavan
  • rishabh.shukla
  • riyasaini
  • yash-postman
  • karnsharma
  • priyambadamadala
  • suhas_gaikwad
  • darshan.sen
  • yatin1997
  • kartikj
  • saswatds
  • sujayvenaik
  • kratigya
  • shubham.ranjan
  • davidespi
  • numaanashraf
  • shamasis
  • abhijitkane
  • hg07
  • kamalaknn
  • nikithaachhini
  • shreyas.panduranga
  • pratiksolim
  • sivcansingh
  • bhargavkaranam96
  • ronak.npm
  • codenirvana
  • tristandenyer
  • sabih.siddiqui
  • shashwat.dixit
  • kriss1897
  • gunjan4542
  • meetdeveloper
  • pawanbana
  • shreyshah
  • vshingala
  • barshan23
  • coditva
  • skrpl
  • jibinmathews7
  • diuda
  • postbot-bitbucket
  • postbot-buildkite
  • dannydainton
  • brandonmcastillo
  • michaelclaus
  • devansh21
  • arshad.ayub
  • sharma.nikhil1997
  • smitshah173
  • atishay-postman
  • saket_ranjan
  • dhawan29
  • arlemi.postman
  • pankajk0791
  • mdamankh
  • apoorvajain08
  • arvind-kalra
  • dip_postman
  • akshay24
  • chetan.waingankar
  • balakrishna.avulapati
  • harsha.dixit
  • saialekhya.yerragunta
  • pranav.singhal
  • amrindersandhu
  • deepanshurana
  • mudit1804
  • prashant-raghu
  • waseem.siddiqui
  • hemendra.kumar
  • bswisher
  • himanshu0809
  • avinashchoudhary
  • gouthamaj
  • tim.beauchamp
  • amrit_vyas
  • ayush.raj
  • brent.cromarty
  • sandeep.singh
  • abhijeetborole
  • mehul.agrawal
  • sonymathew
  • hardik286
  • appurvamurawat
  • phani-postman
  • chinmayj195
  • harsh_bansal
  • srinivas.kini
  • jony.cheung.postman
  • rrc083
  • diya.ninan
  • shruti_paranjape
  • utsav.kapoor1994
  • abhishek_s
  • subhash.yadav
  • pankajkumar05
  • prithvi.tharun
  • ashish.gupta1
  • bot.npm.cf.starship
  • meenakshi.dhanani