mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Second draft
This commit is contained in:
parent
6f727f7408
commit
4a3eb6b84b
2 changed files with 18 additions and 1 deletions
|
|
@ -843,3 +843,19 @@ browser.runtime.onMessage.addListener(async function(req, sender) {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Webauthn
|
||||
const webauthn = document.createElement('script');
|
||||
webauthn.src = browser.runtime.getURL('content/webauthn.js');
|
||||
document.documentElement.appendChild(webauthn);
|
||||
|
||||
window.addEventListener('message', (ev) => {
|
||||
if (ev.data.action === 'webauthn-create') {
|
||||
console.log('Request from: ', ev.origin);
|
||||
|
||||
// Send a test response after a delay
|
||||
setInterval(() => {
|
||||
window.postMessage({ action: 'webauthn-create-response' }, window.location.origin);
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -136,7 +136,8 @@
|
|||
"css/notification.css",
|
||||
"css/pwgen.css",
|
||||
"css/username.css",
|
||||
"css/totp.css"
|
||||
"css/totp.css",
|
||||
"content/webauthn.js"
|
||||
],
|
||||
"permissions": [
|
||||
"activeTab",
|
||||
|
|
|
|||
Loading…
Reference in a new issue