this post was submitted on 02 Aug 2023
9 points (100.0% liked)
Ask Experienced Devs
1064 readers
1 users here now
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Ideally you should use the help from the OS. For example if you target Apple they provide this keychain API made for that.
https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/storing_keys_in_the_keychain
But looking I found this apparently portable lib https://github.com/hrantzsch/keychain
For Linux there's gnome keyring.
keyctl
thenIt has no dependency on a specific DE.
Windows credential manager is also an option baked into the OS, though I don't have experience working with it to say how good or bad it is
https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues
This shows how MS Visual Code stores the password in keychain in various OSes.