Enabling Strong Authentication with WebAuthn - Chrome Developers

PHOTO EMBED

Wed Feb 01 2023 03:17:26 GMT+0000 (Coordinated Universal Time)

Saved by @gebaby #javascript

let credential = await navigator.credentials.create({ publicKey: {
  challenge: new Uint8Array([117, 61, 252, 231, 191, 241, ...]),
  rp: { id: "acme.com", name: "ACME Corporation" },
  user: {
    id: new Uint8Array([79, 252, 83, 72, 214, 7, 89, 26]),
    name: "jamiedoe",
    displayName: "Jamie Doe"
  },
  pubKeyCredParams: [ {type: "public-key", alg: -7} ]
}});
content_copyCOPY

https://developer.chrome.com/blog/webauthn/