atom / node-keytar

Native Password Node Module
https://atom.github.io/node-keytar
MIT License
1.37k stars 193 forks source link

[win] handle different value for cred.Persist = CRED_PERSIST_ENTERPRISE; #453

Open fulgored opened 2 years ago

fulgored commented 2 years ago

Summary

Change the CREDENTIAL.persist value for managing other value than CRED_PERSIST_ENTERPRISE (https://docs.microsoft.com/en-us/windows/win32/api/wincred/ns-wincred-credentiala#:~:text=CRED_PERSIST_LOCAL_MACHINE)

Motivation

For security reasons, it may be interesting to link the value only to the workstation and not to the account.

Describe alternatives you've considered

The current value is hard coded

Additional context

The solution could be adding a facultatif parametre on the JS side to the setPassword function