1
<input type="text" id="input">
3
const testCtapPinInvalidErrorBase64 = "MQ==";
4
const testPinGetRetriesResponseBase64 = "AKEDCA==";
5
const testPinGetKeyAgreementResponseBase64 = "AKEBpQECAzgYIAEhWCDodiWJbuTkbcAydm6Ah5YvNt+d/otWfzdjAVsZkKYOFCJYICfeYS1mQYvaGVBYHrxcjB2tcQyxTCL4yXBF9GEvsgyR";
6
const testCtapInvalidParameterErrorBase64 = "Ag==";
7
if (window.internals) {
8
internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testCtapInvalidParameterErrorBase64] } });
9
internals.withUserGesture(() => { input.focus(); });
18
name: "John Appleseed",
19
id: new Uint8Array(16),
20
displayName: "Appleseed",
22
challenge: new Uint8Array(16),
23
pubKeyCredParams: [{ type: "public-key", alg: -7 }]
27
navigator.credentials.create(options).then(credential => {
28
// console.log("Succeeded!");
29
window.webkit.messageHandlers.testHandler.postMessage("Succeeded!");
31
// console.log(error.message);
32
window.webkit.messageHandlers.testHandler.postMessage(error.message);