
JavaScript
- 4 ответа
- 0 вопросов
2
Вклад в тег
const publicKey = {
challenge: new Uint8Array(32),
rp: { name: "Example Corp" },
user: {
id: new Uint8Array(16),
name: "user@example.com",
displayName: "User"
},
pubKeyCredParams: [{ alg: -7, type: "public-key" }],
authenticatorSelection: {
authenticatorAttachment: "platform",
userVerification: "required",
residentKey: "required"
},
timeout: 60000,
attestation: "none"
};
const cred = await navigator.credentials.create({ publicKey });
console.log(cred);