Cómo usar Keytar Electron

const keytar = require('keytar');

keytar.setPassword('KeytarTest', 'AccountName', 'secret');

const secret = keytar.getPassword('KeytarTest', 'AccountName');
secret.then((result) => {
    console.log("result: "+ result); // result will be 'secret'
});
Ill Iguana