Files
publisher-dashboard/packages/testing/virtual-authenticator
igm c9de0b1ac5 Add sideEffects: false to all library packages
Enables tree-shaking for bundlers by marking all library packages
as side-effect-free.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 15:22:24 +08:00
..
2026-01-12 13:59:34 +08:00

@reviq/virtual-authenticator

WebAuthn virtual authenticator for testing passkey registration and authentication flows.

Usage

import { VirtualAuthenticator } from "@reviq/virtual-authenticator";

const authenticator = new VirtualAuthenticator({
  aaguid: "00000000-0000-0000-0000-000000000000",
});

// Create a credential during registration
const credential = await authenticator.create(
  publicKeyCredentialCreationOptions,
);

// Use the credential during authentication
const assertion = await authenticator.get(
  publicKeyCredentialRequestOptions,
);

Exports

Classes

  • VirtualAuthenticator - Simulates a WebAuthn authenticator

Utilities

  • base64urlToUint8Array(str) - Decode base64url to bytes
  • uint8ArrayToBase64url(bytes) - Encode bytes to base64url
  • parseAaguid(str) - Parse an AAGUID string to bytes

Constants

  • DEFAULT_AAGUID - Default AAGUID for the virtual authenticator

Types

  • VirtualAuthenticatorOptions - Configuration options for the authenticator