Skip to content

Instantly share code, notes, and snippets.

@adhithiravi
Created November 3, 2018 16:39
Show Gist options
  • Save adhithiravi/e9c8eb17b2cf6f7239e338c7bb8387f7 to your computer and use it in GitHub Desktop.
Save adhithiravi/e9c8eb17b2cf6f7239e338c7bb8387f7 to your computer and use it in GitHub Desktop.
Keychain.getInternetCredentials(server).then(credentials => {
if (credentials) {
console.log('Credentials successfully loaded for user ' + credentials.username)
}
else {
console.log('Could not retrieve credentials for server')
}
}).catch(error => {
console.log('Could not get credentials from keychain')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment