Secrets are now managed by native OS credential store. #1618
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1464
Please try to break this :)
Bot secrets are now stored by your OS in your native credential store:
Windows: Credential Manager
Mac: Keychain
Linux: Secret Service API / libsecret
NOTE #1: Due to the fact that we now use
keytar
which is a native node addon, it has to be built properly for Electron when launching and running the app, and must be built for Node when running the tests (Jest environment).I couldn't figure out a way to have it easily built for both environments, so if you decide to flip back and forth between running tests and launching the app, then you will need to use the scripts in the
root/package.json
file:rebuild:keytar:electron
: use when you want to run the apprebuild:keytar:node
: use when you want to run the testsLet me know if you think this process could be improved or better documented.
NOTE #2: The library used to rebuild
keytar
for Electron,electron-rebuild
, does not play nicely with Lerna monorepos, and sokeytar
had to be added as a dependency to the rootpackage.json
file. This should not have any adverse effects other than there being an extra line in the file. I opened an issue againstelectron-rebuild
and it can be found here.