Fingerprint is a device intelligence platform offering 99.5% accurate visitor
identification. Fingerprint Pro React Native SDK is an easy way to integrate Fingerprint Pro into your React Native
application to call the native Fingerprint Pro libraries (Android and iOS) and identify devices.
Use the useVisitorData hook in your components to perform visitor identification and get the data.
// src/App.jsimportReact, { useEffect } from'react';
import { Text } from'react-native';
import { useVisitorData } from'@fingerprintjs/fingerprintjs-pro-react-native';
functionApp() {
const {
isLoading,
error,
data,
getData,
} = useVisitorData();
useEffect(() => {
getData();
}, []);
if (isLoading) {
return<Text>Loading...</Text>;
}
if (error) {
return<Text>An error occured: {error.message}</Text>;
}
if (data) {
// perform some logic based on the visitor datareturn (
<Text>
Visitor id is {data.visitorId}
</Text>
);
} else {
returnnull;
}
}
exportdefaultApp;
API Client approach
importReact, { useEffect } from'react';
import { FingerprintJsProAgent } from'@fingerprintjs/fingerprintjs-pro-react-native';
// ... useEffect(() => {
asyncfunctiongetVisitorInfo() {
try {
constFingerprintClient = newFingerprintJsProAgent({ apiKey: 'PUBLIC_API_KEY', region: 'eu' }); // Region may be 'us', 'eu', or 'ap'const visitorId = awaitFingerprintClient.getVisitorId(); // Use this method if you need only visitorIdconst visitorData = awaitFingerprintClient.getVisitorData(); // Use this method if you need additional information about visitor// use visitor data in your code
} catch (e) {
console.error('Error: ', e);
}
}
getVisitorInfo();
}, []);
extendedResponseFormat
Two types of responses are supported: "default" and "extended". You don't need to pass any parameters to get the "default" response.
"Extended" is an extended result format that includes geolocation, incognito mode and other information.
It can be requested using the extendedResponseFormat: true parameter. See more details about the responses in the documentation.
Providing extendedResponseFormat with hooks approach
Providing extendedResponseFormat with API Client approach
constFingerprintClient = newFingerprintJsProAgent({ apiKey: 'PUBLIC_API_KEY', region: 'eu', extendedResponseFormat: true }); // Region may be 'us', 'eu', or 'ap'// =================================================================================================^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Linking and tagging information
The visitorId provided by Fingerprint Identification is especially useful when combined with information you already know about your users, for example, account IDs, order IDs, etc. To learn more about various applications of the linkedId and tag, see Linking and tagging information.
Official React Native client for Fingerprint PRO. Best identification solution for React Native.
The npm package @fingerprintjs/fingerprintjs-pro-react-native receives a total of 0 weekly downloads. As such, @fingerprintjs/fingerprintjs-pro-react-native popularity was classified as not popular.
We found that @fingerprintjs/fingerprintjs-pro-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 2 open source maintainers collaborating on the project.
Package last updated on 22 Aug 2024
Did you know?
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.
Elastic’s return to open source with the AGPL license has been met with skepticism, as many developers see it as a strategic move rather than a genuine effort to restore user trust and freedoms.
A new "revival hijack" supply chain attack targets deleted Python packages, with an estimated 22K packages at risk. Socket can detect and block hijacked packages that have added malicious code.