The PublicKeyCredentialRequestOptions
dictionary of the Web Authentication API holds the options passed to navigator.credentials.get()
in order to fetch a given PublicKeyCredential
.
const options = {
challenge: new Uint8Array([
]),
rpId: "example.com" ,
userVerification: "preferred",
timeout: 60000,
allowCredentials: [
{
transports: "usb",
type: "public-key",
id: new Uint8Array(26),
},
{
transports: "internal",
type: "public-key",
id: new Uint8Array(26),
},
],
extensions: {
uvm: true,
loc: false,
txAuthSimple: "Could you please verify yourself?",
},
};
navigator.credentials
.get({ publicKey: options })
.then((credentialInfoAssertion) => {
})
.catch((err) => {
console.error(err);
});