react-gpu-fingerprint
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

react-gpu-fingerprint

Get a browser's fingerprint (vendor and hardware) data from a React component using WebGL and the GPU. Some basic browser data is included as well.

Stats

Current NPM Version Current NPM Downloads License Types

Purpose

I needed a decent way (component-wise) to gather some device data to include in a JWT. The device data is very basic, doesn't personally identify the user (obviously), and can likely be used for other purposes as well. It's just good to know!

Install

NPM

In your project's root directory...

npm install --save react-gpu-fingerprint

Git

Cloning the project

git clone git@github.com:yakubori/react-gpu-fingerprint.git

Building

From the project root, install the depndencies, then run the build

npm install
npm run build

Running the sample server

From the project root, install the depndencies, then run the sample server.

npm install
npm run dev

Example Usage

Very simple. Just give the FingerPrint component (or whatever you want to call it) a data handler function.

import React from "react";
import ReactDOM from "react-dom";
import FingerPrint from "react-gpu-fingerprint";

const handleFingerPrintData = (fp) => {
    console.log(fp);
}

ReactDOM.render(
    <FingerPrint dataHandler={handleFingerPrintData} />,
    document.getElementById("root")
);

Contributing

I realize this is a simple module, but I'm totally open to others working on this. Feel free to create your own branch and submit a pull request.

/react-gpu-fingerprint/

    Package Sidebar

    Install

    npm i react-gpu-fingerprint

    Weekly Downloads

    1

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    18.6 kB

    Total Files

    9

    Last publish

    Collaborators

    • yakubro