diff --git a/package.json b/package.json index a5e6a9c..2379996 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "compatibility": "^4.0.0" }, "dependencies": { - "@github/webauthn-json": "^0.5.7", "arraybuffer-to-string": "^1.0.2", "async": "^3.2.0", "base64url": "^3.0.1", diff --git a/static/lib/authn.js b/static/lib/authn.js index 0101e59..2686621 100644 --- a/static/lib/authn.js +++ b/static/lib/authn.js @@ -5,13 +5,12 @@ define('forum/login-authn', ['api', 'alerts', 'hooks'], function (api, alerts, h Plugin.init = async () => { try { - const webauthnJSON = await import('@github/webauthn-json'); const abortController = new AbortController(); hooks.on('action:ajaxify.start', () => { abortController.abort(); }); - const authResponse = await webauthnJSON.get({ + const authResponse = await navigator.credentials.get({ publicKey: ajaxify.data.authnOptions, signal: abortController.signal, }); diff --git a/static/lib/settings.js b/static/lib/settings.js index 2ff400c..992712f 100644 --- a/static/lib/settings.js +++ b/static/lib/settings.js @@ -69,8 +69,7 @@ define('forum/account/2factor', ['api', 'alerts', 'bootbox'], function (api, ale }); api.get('/plugins/2factor/authn/register', {}).then(async (request) => { try { - const webauthnJSON = await import('@github/webauthn-json'); - const response = await webauthnJSON.create({ + const response = await navigator.credentials.create({ publicKey: request, }); modal.modal('hide');