summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/parseAuthenticatorData.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src/helpers/parseAuthenticatorData.ts')
-rw-r--r--packages/server/src/helpers/parseAuthenticatorData.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/helpers/parseAuthenticatorData.ts b/packages/server/src/helpers/parseAuthenticatorData.ts
index 67f0e1a..cce6756 100644
--- a/packages/server/src/helpers/parseAuthenticatorData.ts
+++ b/packages/server/src/helpers/parseAuthenticatorData.ts
@@ -52,7 +52,7 @@ export default function parseAuthenticatorData(authData: Buffer): ParsedAuthenti
// Decode the next CBOR item in the buffer, then re-encode it back to a Buffer
const firstDecoded = decodeCborFirst(intBuffer);
- const firstEncoded = Buffer.from(cbor.encode(firstDecoded));
+ const firstEncoded = Buffer.from(cbor.encode(firstDecoded) as ArrayBuffer);
credentialPublicKey = firstEncoded;
intBuffer = intBuffer.slice(firstEncoded.byteLength);
}
@@ -60,7 +60,7 @@ export default function parseAuthenticatorData(authData: Buffer): ParsedAuthenti
let extensionsDataBuffer: Buffer | undefined = undefined;
if (flags.ed) {
const firstDecoded = decodeCborFirst(intBuffer);
- const firstEncoded = Buffer.from(cbor.encode(firstDecoded));
+ const firstEncoded = Buffer.from(cbor.encode(firstDecoded) as ArrayBuffer);
extensionsDataBuffer = firstEncoded;
intBuffer = intBuffer.slice(firstEncoded.byteLength);
}