diff --git a/keepassxc-browser/content/passkeys-utils.js b/keepassxc-browser/content/passkeys-utils.js index 1ee553a..33d77e4 100644 --- a/keepassxc-browser/content/passkeys-utils.js +++ b/keepassxc-browser/content/passkeys-utils.js @@ -94,6 +94,11 @@ kpxcPasskeysUtils.buildCredentialCreationOptions = function(pkOptions, sameOrigi publicKey.user.id = arrayBufferToBase64(pkOptions.user.id); publicKey.user.name = pkOptions.user.name; + // TODO: Disable after fixed in KeePassXC side + if (!publicKey.rp.id) { + publicKey.rp.id = window.location.hostname; + } + return publicKey; } catch (e) { console.log(e); @@ -125,7 +130,7 @@ kpxcPasskeysUtils.buildCredentialRequestOptions = function(pkOptions, sameOrigin const arr = { id: arrayBufferToBase64(cred.id), - transports: transports, + transports: [ ...transports, 'internal' ], type: cred.type }; @@ -133,6 +138,11 @@ kpxcPasskeysUtils.buildCredentialRequestOptions = function(pkOptions, sameOrigin } } + // TODO: Disable after fixed in KeePassXC side + if (!publicKey.rpId) { + publicKey.rpId = window.location.hostname; + } + return publicKey; } catch (e) { console.log(e);