{"id":19167209,"url":"https://github.com/fingerprintjs/fingerprintjs-pro-react-native","last_synced_at":"2025-04-04T12:09:57.928Z","repository":{"id":40242990,"uuid":"450123439","full_name":"fingerprintjs/fingerprintjs-pro-react-native","owner":"fingerprintjs","description":"Official React Native client for Fingerprint PRO. 100% accurate device identification for fraud detection.","archived":false,"fork":false,"pushed_at":"2025-04-04T10:25:29.000Z","size":4318,"stargazers_count":66,"open_issues_count":3,"forks_count":5,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-04T11:27:58.678Z","etag":null,"topics":["fingerprint","fingerprintjs","fingerprintjs-pro","fraud-detection","integration","react","react-native"],"latest_commit_sha":null,"homepage":"https://fingerprint.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fingerprintjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-20T14:11:10.000Z","updated_at":"2025-04-02T11:36:02.000Z","dependencies_parsed_at":"2022-07-25T18:22:46.894Z","dependency_job_id":"e60090c4-aa80-4f12-b0ad-350fd544e750","html_url":"https://github.com/fingerprintjs/fingerprintjs-pro-react-native","commit_stats":{"total_commits":137,"total_committers":15,"mean_commits":9.133333333333333,"dds":0.4890510948905109,"last_synced_commit":"e9892ca4ab27225980e21fe8c15e0b65e3340e9e"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprintjs-pro-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprintjs-pro-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprintjs-pro-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprintjs-pro-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fingerprintjs","download_url":"https://codeload.github.com/fingerprintjs/fingerprintjs-pro-react-native/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174454,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fingerprint","fingerprintjs","fingerprintjs-pro","fraud-detection","integration","react","react-native"],"created_at":"2024-11-09T09:36:20.565Z","updated_at":"2025-04-04T12:09:57.897Z","avatar_url":"https://github.com/fingerprintjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://fingerprint.com\"\u003e\n    \u003cpicture\u003e\n     \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://fingerprintjs.github.io/home/resources/logo_light.svg\" /\u003e\n     \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://fingerprintjs.github.io/home/resources/logo_dark.svg\" /\u003e\n     \u003cimg src=\"https://fingerprintjs.github.io/home/resources/logo_dark.svg\" alt=\"Fingerprint logo\" width=\"312px\" /\u003e\n   \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://fingerprintjs.github.io/fingerprintjs-pro-react-native/coverage/\"\u003e\n    \u003cimg src=\"https://fingerprintjs.github.io/fingerprintjs-pro-react-native/coverage/badges.svg\" alt=\"coverage\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@fingerprintjs/fingerprintjs-pro-react-native\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@fingerprintjs/fingerprintjs-pro-react-native.svg?style=flat\" alt=\"Current NPM version\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@fingerprintjs/fingerprintjs-pro-react-native\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/@fingerprintjs/fingerprintjs-pro-react-native.svg\" alt=\"Monthly downloads from NPM\"\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/:license-mit-blue.svg?style=flat\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.gg/39EpE2neBg\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/852099967190433792?style=logo\u0026label=Discord\u0026logo=Discord\u0026logoColor=white\" alt=\"Discord server\"\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://fingerprintjs.github.io/fingerprintjs-pro-react-native/\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/-Documentation-green\" alt=\"Discord server\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# Fingerprint Pro React Native\n\n[Fingerprint](https://fingerprint.com/) is a device intelligence platform offering 99.5% accurate visitor\nidentification. Fingerprint Pro React Native SDK is an easy way to integrate Fingerprint Pro into your React Native\napplication to call the native Fingerprint Pro libraries (Android and iOS) and identify devices.\n\n## Table of contents\n\n- [Fingerprint Pro React Native](#fingerprint-pro-react-native)\n  - [Table of contents](#table-of-contents)\n  - [Requirements and limitations](#requirements-and-limitations)\n  - [Dependencies](#dependencies)\n  - [How to install](#how-to-install)\n    - [1. Install the package using your favorite package manager:](#1-install-the-package-using-your-favorite-package-manager)\n    - [2. Configure iOS dependencies (if developing on iOS)](#2-configure-ios-dependencies-if-developing-on-ios)\n    - [3. Configure Android dependencies (if developing on Android)](#3-configure-android-dependencies-if-developing-on-android)\n      - [Gradle 7 or newer](#gradle-7-or-newer)\n      - [Gradle 6.0 or older](#gradle-60-or-older)\n  - [Usage](#usage)\n    - [Hooks approach](#hooks-approach)\n    - [API Client approach](#api-client-approach)\n    - [`extendedResponseFormat`](#extendedresponseformat)\n    - [Linking and tagging information](#linking-and-tagging-information)\n  - [API Reference](#api-reference)\n  - [Additional Resources](#additional-resources)\n  - [Support and feedback](#support-and-feedback)\n  - [License](#license)\n\n## Requirements and limitations\n\n- React Native 0.73 or higher\n- Android 5.0 (API level 21+) or higher\n- iOS 13+/tvOS 15+, Swift 5.7 or higher (stable releases)\n\n- Fingerprint Pro [request filtering](https://dev.fingerprint.com/docs/request-filtering) is not supported right now. Allowed and forbidden origins cannot be used.\n- Usage inside the [Expo environment](https://docs.expo.dev) is not supported right now.\n\n## Dependencies\n\n- [Fingerprint Pro iOS](https://github.com/fingerprintjs/fingerprintjs-pro-ios)\n- [Fingerprint Pro Android](https://github.com/fingerprintjs/fingerprintjs-pro-android)\n\n## How to install\n\n### 1. Install the package using your favorite package manager:\n\n- [NPM](https://npmjs.org):\n\n  ```shell\n  npm install @fingerprintjs/fingerprintjs-pro-react-native --save\n  ```\n\n- [Yarn](https://yarnpkg.com):\n\n  ```shell\n  yarn add @fingerprintjs/fingerprintjs-pro-react-native\n  ```\n\n- [PNPM](https://pnpm.js.org):\n  ```shell\n  pnpm add @fingerprintjs/fingerprintjs-pro-react-native\n  ```\n\n### 2. Configure iOS dependencies (if developing on iOS)\n\n```shell\ncd ios \u0026\u0026 pod install\n```\n\n### 3. Configure Android dependencies (if developing on Android)\n\nAdd the repositories to your Gradle configuration file. The location for these additions depends on your project's structure and the Gradle version you're using:\n\n#### Gradle 7 or newer\n\nFor Gradle 7.0 and higher (if you've adopted [the new Gradle settings file approach](https://developer.android.com/build#settings-file)), you likely manage repositories in the `dependencyResolutionManagement` block in `{rootDir}/android/settings.gradle`. Add the Maven repositories in this block:\n\n```groovy\ndependencyResolutionManagement {\n  repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)\n  repositories {\n    google()\n    mavenCentral()\n    maven {\n      url(\"https://maven.fpregistry.io/releases\") // Add this\n    }\n  }\n}\n```\n\n#### Gradle 6.0 or older\n\nFor Gradle versions before 7.0, you likely have an `allprojects` block in `{rootDir}/android/build.gradle`. Add the Maven repositories within this block:\n\n```groovy\nallprojects {\n    repositories {\n      mavenCentral()\n      mavenLocal()\n      maven {\n        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm\n        url(\"$rootDir/../node_modules/react-native/android\")\n      }\n      maven {\n        // Android JSC is installed from npm\n        url(\"$rootDir/../node_modules/jsc-android/dist\")\n      }\n      maven {\n        url(\"https://maven.fpregistry.io/releases\") // Add this\n      }\n      google()\n    }\n}\n```\n\n## Usage\n\nTo identify visitors, you need a Fingerprint Pro account (you can [sign up for free](https://dashboard.fingerprint.com/signup/)).\n\n- Go to [the Fingerprint Pro dashboard](https://dashboard.fingerprint.com/).\n- Open **App Settings** \u003e **API Keys** to find your Public API key.\n\n### Hooks approach\n\nConfigure the SDK by wrapping your application in FingerprintJsProProvider.\n\n```javascript\n// src/index.js\nimport React from 'react';\nimport { AppRegistry } from 'react-native';\nimport { FingerprintJsProProvider } from '@fingerprintjs/fingerprintjs-pro-react-native';\nimport App from './App';\nimport { name as appName } from './app.json';\n\nconst WrappedApp = () =\u003e (\n  \u003cFingerprintJsProProvider apiKey={'your-fpjs-public-api-key'} region={'eu'}\u003e\n    \u003cApp /\u003e\n  \u003c/FingerprintJsProProvider\u003e\n)\n\nAppRegistry.registerComponent(appName, () =\u003e WrappedApp);\n```\n\nUse the `useVisitorData` hook in your components to perform visitor identification and get the data.\n\n```javascript\n// src/App.js\nimport React from 'react'\nimport {Button, SafeAreaView, Text, View} from 'react-native'\nimport {useVisitorData} from '@fingerprintjs/fingerprintjs-pro-react-native'\n\nexport default function App() {\n  const {isLoading, error, data, getData} = useVisitorData()\n\n  return (\n    \u003cSafeAreaView\u003e\n      \u003cView style={{ margin: 8 }}\u003e\n        \u003cButton title='Reload data' onPress={() =\u003e getData()} /\u003e\n        {isLoading ? (\n          \u003cText\u003eLoading...\u003c/Text\u003e\n        ) : (\n          \u003c\u003e\n            \u003cText\u003eVisitorId: {data?.visitorId}\u003c/Text\u003e\n            \u003cText\u003eFull visitor data:\u003c/Text\u003e\n            \u003cText\u003e{error ? error.message : JSON.stringify(data, null, 2)}\u003c/Text\u003e\n          \u003c/\u003e\n        )}\n      \u003c/View\u003e\n    \u003c/SafeAreaView\u003e\n  )\n}\n```\n\n### API Client approach\n\n```javascript\nimport React, { useEffect } from 'react';\nimport { FingerprintJsProAgent } from '@fingerprintjs/fingerprintjs-pro-react-native';\n\n// ... \n\nuseEffect(() =\u003e {\n  async function getVisitorInfo() {\n    try {\n      const FingerprintClient = new FingerprintJsProAgent({ apiKey: 'PUBLIC_API_KEY', region: 'eu' }); // Region may be 'us', 'eu', or 'ap'\n      const visitorId = await FingerprintClient.getVisitorId(); // Use this method if you need only visitorId\n      const visitorData = await FingerprintClient.getVisitorData(); // Use this method if you need additional information about visitor\n      // use visitor data in your code\n    } catch (e) {\n      console.error('Error: ', e);\n    }\n  }\n  getVisitorInfo();\n}, []);\n```\n\n### `extendedResponseFormat`\n\nTwo types of responses are supported: \"default\" and \"extended\". You don't need to pass any parameters to get the \"default\" response.\n\"Extended\" is an extended result format that includes geolocation, incognito mode and other information.\nIt can be requested using the `extendedResponseFormat`: true parameter. See more details about the responses in the [documentation](https://dev.fingerprint.com/reference/get-function#extendedresult).\n\nProviding `extendedResponseFormat` using hooks:\n\n```javascript\nreturn (\n  \u003cFingerprintJsProProvider apiKey={PUBLIC_API_KEY} extendedResponseFormat={true}\u003e\n    \u003cApp /\u003e\n  \u003c/FingerprintJsProProvider\u003e\n)\n```\n\nProviding `extendedResponseFormat` using the API Client:\n\n```javascript\nconst FingerprintClient = new FingerprintJsProAgent({\n  apiKey: 'PUBLIC_API_KEY',\n  region: 'eu',\n  extendedResponseFormat: true,\n})\n```\n\n### Linking and tagging information\n\nThe `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](https://dev.fingerprint.com/docs/tagging-information).\n\n```javascript\nconst tag = {\n  userAction: 'login',\n  analyticsId: 'UA-5555-1111-1'\n};\nconst linkedId = 'user_1234';\n\n// Using hooks\nconst { getData } = useVisitorData();\nconst visitorData = await getData(tag, linkedId);\n\n// Using the client\nconst FingerprintClient = new FingerprintJsProAgent({ apiKey: 'PUBLIC_API_KEY'});\nconst visitorId = await FingerprintClient.getVisitorId(tag, linkedId);\nconst visitor = await FingerprintClient.getVisitorData(tag, linkedId); \n```\n\n## API Reference\n\nSee the full [generated API Reference](https://fingerprintjs.github.io/fingerprintjs-pro-react-native/).\n\n## Additional Resources\n\n- [Server-to-Server API](https://dev.fingerprint.com/docs/server-api)\n- [Fingerprint Pro documentation](https://dev.fingerprint.com/docs)\n\n## Support and feedback\n\nTo report problems, ask questions or provide feedback, please\nuse [Issues](https://github.com/fingerprintjs/fingerprintjs-pro-react-native/issues). If you need private support,\nplease email us at `oss-support@fingerprint.com`.\n\n## License\n\nThis project is licensed under the [MIT license](https://github.com/fingerprintjs/fingerprintjs-pro-react-native/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffingerprintjs%2Ffingerprintjs-pro-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffingerprintjs%2Ffingerprintjs-pro-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffingerprintjs%2Ffingerprintjs-pro-react-native/lists"}