Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-browser-fingerprint

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-browser-fingerprint

Zero dependencies package exporting a single, fast (<15ms) and synchronous function which computes a browser fingerprint, without requiring any permission to the user.

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.6K
increased by132.09%
Maintainers
1
Weekly downloads
 
Created
Source

get-browser-fingerprint

Zero dependencies package exporting a single, fast (<15ms) and synchronous function which computes a browser fingerprint, without requiring any permission to the user.

Usage

Get browser fingerprint:

import getBrowserFingerprint from 'get-browser-fingerprint';
const fingerprint = getBrowserFingerprint();
console.log(fingerprint);

Options available:

  • hardwareOnly (default false): leverage only hardware info about device
  • enableWebgl (default false): enable webgl renderer, ~4x times slower but adds another deadly powerful hardware detection layer on top of canvas
  • debug: log data used to generate fingerprint to console and add canvas/webgl canvas to body to see rendered image (default false)

⚠️ Be careful: the strongest discriminating factor is canvas token which can't be computed on old devices (eg: iPhone 6), deal accordingly ⚠️

Development

To test locally:

nvm install
yarn install
yarn test

To run example locally:

yarn http-server src -o -c-1 -p 80

FAQs

Package last updated on 02 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc