Skip to content

Instantly share code, notes, and snippets.

@truongnmt
Created January 9, 2022 22:41
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 truongnmt/08f01c690dec5aa7a65d2fa647931e28 to your computer and use it in GitHub Desktop.
Save truongnmt/08f01c690dec5aa7a65d2fa647931e28 to your computer and use it in GitHub Desktop.
credential.js
function get(credentialOptions) {
WebAuthnJSON.get({ "publicKey": credentialOptions }).then(function(credential) {
callback("/session/callback", credential);
}).catch(function(error) {
showMessage(error);
});
console.log("Getting public key credential...");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment