new version of dfido2-lib.js
This commit is contained in:
@@ -433,6 +433,11 @@ async function doAttestation(username, displayName, rpId, userVerification = 'pr
|
||||
},
|
||||
};
|
||||
|
||||
// Capture transports if available (WebAuthn Level 2+)
|
||||
if (res.response.getTransports) {
|
||||
attResult.transports = res.response.getTransports();
|
||||
}
|
||||
|
||||
const result = await fetch(localStorage.getItem(DFIDO2_LIB_LOCALSTG_NAME_SVR_URL) + "/attestation/result", {
|
||||
method: "POST",
|
||||
cache: "no-cache",
|
||||
@@ -476,11 +481,13 @@ async function doAssertion(username = null, rpId = null, userVerification = 'pre
|
||||
var process_time_limit = Number.MAX_SAFE_INTEGER
|
||||
try {
|
||||
let authnOptions;
|
||||
/*if (!username) {
|
||||
/*
|
||||
Tested the codes below, but most browsers cannot find correct account when username is null.
|
||||
if (!username || 0 === username.length) {
|
||||
authnOptions = {
|
||||
authenticatorSelection: {
|
||||
//authenticatorAttachment: "platform",
|
||||
userVerification: "discouraged"
|
||||
userVerification: userVerification
|
||||
}
|
||||
};
|
||||
} else {
|
||||
@@ -488,7 +495,7 @@ async function doAssertion(username = null, rpId = null, userVerification = 'pre
|
||||
username: username,
|
||||
authenticatorSelection: {
|
||||
//authenticatorAttachment: "platform",
|
||||
userVerification: "preferred"
|
||||
userVerification: userVerification
|
||||
}
|
||||
};
|
||||
}*/
|
||||
|
||||
Reference in New Issue
Block a user