Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const clientData = JSON.stringify({
- challenge: base64url.encode(Buffer.from(publicKeyCreationOptions.challenge as ArrayBuffer)),
- hashAlgorithm: 'SHA-256',
- origin,
- type: 'webauthn.create',
- });
- const keyParams: EcdsaParams = { name: 'ECDSA', hash: 'SHA-256' };
- const signature = await window.crypto.subtle.sign(
- keyParams,
- keyPair.privateKey,
- new TextEncoder().encode(clientData),
- );
Add Comment
Please, Sign In to add comment