Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 05f33d2

Browse files
committed
Add the hybrid transport type. Fixes #67.
We extend `AuthenticatorTransport` to enable this.
1 parent bd17f50 commit 05f33d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/webauthn-json/basic/json.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ export interface PublicKeyCredentialWithClientExtensionResults
2121

2222
// Shared
2323

24+
type AuthenticatorTransportJSON = AuthenticatorTransport | "hybrid";
25+
2426
export interface PublicKeyCredentialDescriptorJSON {
2527
type: PublicKeyCredentialType;
2628
id: Base64urlString;
27-
transports?: AuthenticatorTransport[];
29+
transports?: AuthenticatorTransportJSON[];
2830
}
2931

3032
interface SimpleWebAuthnExtensionsJSON {
@@ -85,7 +87,7 @@ export interface CredentialCreationOptionsJSON {
8587
export interface AuthenticatorAttestationResponseJSON {
8688
clientDataJSON: Base64urlString;
8789
attestationObject: Base64urlString;
88-
transports: string[];
90+
transports: AuthenticatorTransportJSON[];
8991
// This field is technically not optional in the spec, but Firefox hasn't implemented it.
9092
authenticatorAttachment?: AuthenticatorAttachment | null;
9193
}

0 commit comments

Comments
 (0)