Merge pull request #2082 from keepassxreboot/fix/passkeys_userverification_defaults

Passkeys: Set userVerification to default value if not found
This commit is contained in:
Sami Vänttinen 2024-01-15 07:22:08 +02:00 committed by GitHub
commit 2c07677207
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,6 +66,10 @@ kpxcPasskeysUtils.buildCredentialCreationOptions = function(pkOptions) {
const publicKey = {};
publicKey.attestation = pkOptions.attestation || 'none';
publicKey.authenticatorSelection = pkOptions.authenticatorSelection || { userVerification: 'preferred' };
if (!publicKey.authenticatorSelection.userVerification) {
publicKey.authenticatorSelection.userVerification = 'preferred';
}
publicKey.challenge = arrayBufferToBase64(pkOptions.challenge);
publicKey.extensions = pkOptions.extensions;
publicKey.pubKeyCredParams = pkOptions.pubKeyCredParams;