Skip to content

Instantly share code, notes, and snippets.

@herrjemand
Last active January 15, 2019 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herrjemand/e08e65ba8dc8af68ccc7947cdc4bcb0c to your computer and use it in GitHub Desktop.
Save herrjemand/e08e65ba8dc8af68ccc7947cdc4bcb0c to your computer and use it in GitHub Desktop.
var publicKey = {
challenge: challenge,
allowCredentials: [
{ type: "public-key", id: credentialId }
]
}
navigator.credentials.get({ 'publicKey': publicKey })
.then((getAssertionResponse) => {
alert('SUCCESSFULLY GOT AN ASSERTION! Open your browser console!')
console.log('SUCCESSFULLY GOT AN ASSERTION!', getAssertionResponse)
})
.catch((error) => {
alert('Open your browser console!')
console.log('FAIL', error)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment