尝试在 Firefox Nightly 下运行可用的 webautn 规范 ( https://www.w3.org/TR/webauthn/ )演示 ( https://github.com/molekilla/webauthn-demo-fork )。
getMakeCredentialsChallenge({
username,
name
})
.then((response) => {
console.log(response);
let publicKey = preformatMakeCredReq(response);
console.log(publicKey);
console.log(publicKey.challenge)
return navigator.credentials.create({publicKey})
})
每当执行到达 return 语句时,Promise 将保持挂起几秒钟并最终拒绝,记录[Exception... "Abort" nsresult: "0x80004004 (NS_ERROR_ABORT)" location: "<unknown>" data: no]
或UnknownError: The operation failed for an unknown transient reason
。两个对象看起来都很好。关于它无法解决的原因的任何想法?