Getting Started

Configuration

FingerprintOptions controls which signals are collected, how long collection may run, and how much detail comes back.

FingerprintOptions

Every public function accepts an optional FingerprintOptions object. All fields have safe defaults, so you can start with zero configuration and tune as needed.

Options reference

FieldTypeDefaultDescription
tiersnumber[][1]Which tier levels to collect. Tier 1 is fast and reliable; tier 2 adds broader hardware coverage; tier 3 is niche and low-entropy.
timeoutnumber5000Global collection timeout in milliseconds. Collection stops after this deadline; any unfinished signal is recorded as absent.
excludestring[][]Signal names to skip entirely. Useful for removing signals that are slow or redundant for your use case.
debugbooleanfalseWhen true, raw signal values (before hashing) are included in the output. Keep false in production.

The tier model

Signals are grouped into three tiers based on reliability and collection cost. Tier 1 runs nine signals by default — audio, canvas, webgl_gpu_identity, webgl_params, screen, platform, timezone, fonts, and math. These are fast, high-entropy, and work well across all supported browsers.

Tier 2 adds four opt-in signals: css_probe, media_devices, webgl_gpu_trace, and webgpu. These are slightly slower and may behave differently across browsers. Tier 3 is two niche signals — speech_voices and storage_quota — that are low-entropy and restricted in some environments.

Pass tiers: [1, 2] or tiers: [1, 2, 3] to opt in to broader coverage. The default tiers: [1] is the right choice for most deployments.

Timeout semantics

The timeout field is a global deadline for the entire collection pass. When the deadline fires, any signal that has not yet completed is recorded as absent (confidence: 'absent') rather than causing a failure. This means you always get a result — it may just have fewer signals.

Individual signal collectors also have internal safety-net timeouts that prevent a single slow API (such as a throttled AudioContext) from blocking all others. These internal timeouts are not user-configurable; the global timeout field controls the outer boundary.

typescript
import { getFingerprint } from 'doorman-benny';

// Tier 1 only, default timeout (recommended for most cases).
const result = await getFingerprint();

// Tier 1 + 2 for hardware fingerprinting with media_devices.
const result2 = await getFingerprint({ tiers: [1, 2] });

// Shorter timeout for latency-sensitive flows.
const result3 = await getFingerprint({ timeout: 2000 });

// Skip a specific signal.
const result4 = await getFingerprint({ exclude: ['fonts'] });

// Debug mode — raw values included (never use in production).
const result5 = await getFingerprint({ debug: true });

All options pass through to createCollector and getDeviceId as well.