官方网站

安装

1
npm i @fingerprintjs/fingerprintjs

使用

1
2
3
4
5
6
7
8
9
10
11
import FingerprintJS from "@fingerprintjs/fingerprintjs";

const getFingerPrintID = async () => {
const fpPromise = await FingerprintJS.load();
const result = await fpPromise.get();
return result.visitorId;
},

setTimeout(() => {
console.log(await getFingerPrintID())
}, 1000);

示例