diff --git a/app/assets/javascripts/new_webauthn.js b/app/assets/javascripts/new_webauthn.js index ae7197e..e68836f 100644 --- a/app/assets/javascripts/new_webauthn.js +++ b/app/assets/javascripts/new_webauthn.js @@ -1,6 +1,4 @@ -import * as WebAuthnJSON from "./@github/webauthn-json" -// import { showMessage } from "messenger"; - +//= require @github/webauthn-json function getCSRFToken() { var CSRFSelector = document.querySelector('meta[name="csrf-token"]') @@ -34,20 +32,18 @@ function callback(url, body, redirect_url) { } function create_webauthn(callbackUrl, credentialOptions) { - WebAuthnJSON.create({ "publicKey": credentialOptions }).then(function(credential) { + create({ "publicKey": credentialOptions }).then(function(credential) { callback(callbackUrl, credential, "/profile/authentication_devices"); }).catch(function(error) { $('#init-error').toggle(); console.log(error); - }); console.log("Creating new public key credential..."); } function get_webauthn(credentialOptions) { - console.log(credentialOptions) - WebAuthnJSON.get({ "publicKey": credentialOptions }).then(function(credential) { + get({ "publicKey": credentialOptions }).then(function(credential) { console.log(credential) callback(`/users/sign_in?user[remember_me]=${remember_me}`, credential, "/"); }).catch(function(error) { diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000..696d033 Binary files /dev/null and b/dump.rdb differ