Quantcast
Channel: How to use keytar (for electron) - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to use keytar (for electron)

$
0
0

So it seems that electron has this module called keytar, but the documentation is lacking a lot, and I have no idea how to use it.

https://github.com/atom/node-keytar

My code right now is (in the main process)

const keytar = require('keytar');...keytar.setPassword('KeytarTest', 'AccountName', 'secret');const secret = keytar.getPassword('KeytarTest', 'AccountName');console.log(secret);

Which prints out

Promise { <pending> }

Could someone teach me how to get the actual password?


Viewing all articles
Browse latest Browse all 2

Trending Articles