1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 18:43:25 +00:00

[PM-18809] Passkey: use ArrayBuffer instead of Uint8Array (#15092)

* Passkey: use ArrayBuffer instead of Uint8Array to conform WebAuthn spec

* ArrayBufferView generics was too modern for this project

* Correctly update the types from Uint8arrays to ArrayBuffers

* Fixed broken tests + bugs

* Removed arrayBufferViewToArrayBuffer as it's not needed in this invocation paths

---------

Co-authored-by: ozraru <ozraru@raru.work>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
This commit is contained in:
Anders Åberg
2025-07-01 21:00:13 +02:00
committed by GitHub
parent c9aa8498c7
commit 5eca3a5916
7 changed files with 26 additions and 23 deletions

View File

@@ -70,7 +70,7 @@ export class Fido2AuthenticatorError extends Error {
}
export interface PublicKeyCredentialDescriptor {
id: Uint8Array;
id: ArrayBuffer;
transports?: ("ble" | "hybrid" | "internal" | "nfc" | "usb")[];
type: "public-key";
}
@@ -155,9 +155,9 @@ export interface Fido2AuthenticatorGetAssertionParams {
export interface Fido2AuthenticatorGetAssertionResult {
selectedCredential: {
id: Uint8Array;
userHandle?: Uint8Array;
id: ArrayBuffer;
userHandle?: ArrayBuffer;
};
authenticatorData: Uint8Array;
signature: Uint8Array;
authenticatorData: ArrayBuffer;
signature: ArrayBuffer;
}