blob: 5f16121ba4ca2db533dfe5d2bf03304cda52462f [file] [log] [blame]
<input type="text" id="input">
<script>
if (window.internals) {
internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false } });
internals.withUserGesture(() => { input.focus(); });
}
const options = {
publicKey: {
rp: {
name: "localhost",
},
user: {
name: "John Appleseed",
id: new Uint8Array(16),
displayName: "Appleseed",
},
challenge: new Uint8Array(16),
pubKeyCredParams: [{ type: "public-key", alg: -35 }, { type: "public-key", alg: -257 }], // ES384, RS256
timeout: 100,
}
};
navigator.credentials.create(options);
</script>