Merge pull request #2141 from keepassxreboot/fix/passkeys_add_exceptions

Add exceptions to Passkeys handling
This commit is contained in:
Sami Vänttinen 2024-03-12 15:15:05 +02:00 committed by GitHub
commit 22af4ac343
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);