A light wrapper around LocalStorage, for storing credentials.
import LocalCredentialStorage from 'local-credential-storage'
const credentials = new LocalCredentialStorage('com.myapp')
// Check and get for saved credentials.
if (credentials.isSet) {
const { username, password } = credentials.get()
}
// Save new credentials.
credentials.set('someuser', 'somepass')
This little bit of code was developed at Body Labs by Paul Melnikow and later open sourced. Thanks to a repository and package transfer from Body Labs, it's being maintained by the original author.
This project is licensed under the 2-clause BSD license.