Skip to content
Seismic Orchestration

getDeviceFingerprint

Computes an opaque identifier for the browser it runs in, for endUser.deviceFingerprint on a verification submit. It is the same value the Seismic dashboard and hosted verification link record. See Device fingerprinting for what it is used for and how to collect the IP address and user agent that go with it.

const  = await ();

The fingerprint is a SHA-256 digest, computed with the browser's built-in Web Crypto API, of signals that stay the same across sessions on one device: user agent, languages, platform, CPU core count, screen size, color depth and pixel ratio, touch support, and time zone. Only the digest is returned. No dependencies are added.

Arguments: none.

Returns: Promise<string | undefined>, a 64-character lowercase hex string. undefined outside a browser, or outside a secure (HTTPS) context where Web Crypto is unavailable. Omit the field rather than substituting a value.

Throws: never.

Call it in the customer's browser, forward the result to your server, and pass it to the submit:

const  = await ..(, {
  : {
    ,
    ,
    ,
  },
});

Calling it on your server returns undefined — and a fingerprint of your server would be the same for every customer anyway.