How to store private key or secure information / data with Electron

Ankur Loriya picture Ankur Loriya · Mar 25, 2016 · Viewed 11.3k times · Source

I am developing standalone app for cross platform using electron.

I want store private data like private key, private data for some execution in app. Execution like encrypt / decrypt data.

Or

I want store some secured information like user password, proprietary data on app

Are any possible way to store these kind of secure information and app user unable to get any way?

Answer

Teak picture Teak · Mar 25, 2016

There is an NPM module made for Atom editor (the app Electron was made for) called Keytar. It uses the native OS APIs for secure storage. eg. The keychain on OS X.

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