Skip to content

Instantly share code, notes, and snippets.

@0xdeepmehta
Created September 18, 2023 06:24
Show Gist options
  • Save 0xdeepmehta/4e6e3f24733aa8e6f7e1fb3668a35c80 to your computer and use it in GitHub Desktop.
Save 0xdeepmehta/4e6e3f24733aa8e6f7e1fb3668a35c80 to your computer and use it in GitHub Desktop.
const credential = (await
navigator
.credentials.create({
publicKey: {
challenge: new Uint8Array(16),
rp: {
name: "0xdeep.com",
},
user: {
id: new Uint8Array(16),
name: "0x@deep",
displayName: "0xDeep",
},
pubKeyCredParams: [
{
type: "public-key",
alg: -7,
},
],
timeout: 60000,
attestation: "direct",
},
})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment