Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
30501cc
feat: prepare public API for V4 migration
TheUnderScorer Aug 10, 2026
42c901a
feat: prepare iOS and Android modules for API v4
TheUnderScorer Aug 10, 2026
687dff3
feat(e2e): migrate tests and SDK to API v4 format
TheUnderScorer Aug 11, 2026
e291978
refactor: refine fingerprint error type check logic
TheUnderScorer Aug 11, 2026
7644be9
docs: update SDK examples for API v4 usage
TheUnderScorer Aug 11, 2026
ecd1bf7
docs: fix links and remove redundant comments in README
TheUnderScorer Aug 11, 2026
8e7ae87
docs: sync readme
TheUnderScorer Aug 11, 2026
5865d64
build(e2e-app): update lockfile
TheUnderScorer Aug 11, 2026
134b685
feat(android, ios): migrate SDK to API v4 format
TheUnderScorer Sep 2, 2026
f41c22c
refactor: rename `tag` to `tags`
TheUnderScorer Sep 2, 2026
dd11332
build(android): update Fingerprint SDK dependency identifier
TheUnderScorer Sep 2, 2026
b29822e
refactor(android): simplify visitor ID retrieval logic
TheUnderScorer Sep 2, 2026
9b438be
build(android): update Kotlin version and compiler args
TheUnderScorer Sep 2, 2026
6850f7f
docs: correct `tag` to `tags` in SDK usage examples
TheUnderScorer Sep 2, 2026
e5cbd47
refactor(e2e-app): improve error details display
TheUnderScorer Sep 2, 2026
9553fc1
refactor(ios): simplify APIError code mapping logic
TheUnderScorer Sep 2, 2026
093dcfd
refactor(errors): add detailed error codes and typings
TheUnderScorer Sep 2, 2026
ec63d52
refactor(e2e-app): migrate to `@fingerprint/node-sdk` usage
TheUnderScorer Sep 2, 2026
5d08356
refactor(e2e-app): replace `@fingerprintjs/pro-server-api` with `node…
TheUnderScorer Sep 3, 2026
882632c
docs(changeset): fix grammar in v4 migration guide
TheUnderScorer Sep 3, 2026
f1e3b2a
refactor(errors): adjust `FingerprintErrorCode` typing for clarity
TheUnderScorer Sep 3, 2026
f232771
docs(build): clarify Kotlin metadata version compatibility
TheUnderScorer Sep 3, 2026
f54d745
fix(ios): carry API error event ID into `FingerprintError.event_id`
Copilot Sep 3, 2026
7396004
refactor(android): enhance error event ID handling logic
TheUnderScorer Sep 3, 2026
2f61447
Merge remote-tracking branch 'origin/feature/INTER-2190-v4-support' i…
TheUnderScorer Sep 3, 2026
146e768
refactor(errors): unify error handling across platforms
TheUnderScorer Sep 3, 2026
19245c8
test: test for event id in error test case
TheUnderScorer Sep 3, 2026
2e9489e
refactor(types): remove `null` from `TagValue` type definition
TheUnderScorer Sep 3, 2026
2fb3d1d
feat: merge options
TheUnderScorer Sep 3, 2026
50773f6
feat: handle deduplication and race conditions
TheUnderScorer Sep 3, 2026
5337e69
test: adjust assertion placement in useVisitorData tests
TheUnderScorer Sep 3, 2026
792c7ff
docs: update confidence mention
TheUnderScorer Sep 3, 2026
6b796f7
docs(sdk): update iOS version support to 14+
TheUnderScorer Sep 3, 2026
d995c1a
Merge remote-tracking branch 'origin/feature/INTER-2190-v4-support' i…
TheUnderScorer Sep 3, 2026
61f4f4c
chore: update root readme
TheUnderScorer Sep 3, 2026
6e95706
feat: prepare public API for V4 migration
TheUnderScorer Aug 10, 2026
f2dca34
feat: prepare iOS and Android modules for API v4
TheUnderScorer Aug 10, 2026
64f1dfb
feat(e2e): migrate tests and SDK to API v4 format
TheUnderScorer Aug 11, 2026
8226375
refactor: refine fingerprint error type check logic
TheUnderScorer Aug 11, 2026
baf0284
docs: update SDK examples for API v4 usage
TheUnderScorer Aug 11, 2026
1ccd496
docs: fix links and remove redundant comments in README
TheUnderScorer Aug 11, 2026
7196206
docs: sync readme
TheUnderScorer Aug 11, 2026
6008355
build(e2e-app): update lockfile
TheUnderScorer Aug 11, 2026
ef4e29d
feat(android, ios): migrate SDK to API v4 format
TheUnderScorer Sep 2, 2026
cfc4191
refactor: rename `tag` to `tags`
TheUnderScorer Sep 2, 2026
4665fc7
build(android): update Fingerprint SDK dependency identifier
TheUnderScorer Sep 2, 2026
ce9176d
refactor(android): simplify visitor ID retrieval logic
TheUnderScorer Sep 2, 2026
6610c61
build(android): update Kotlin version and compiler args
TheUnderScorer Sep 2, 2026
9287cfa
docs: correct `tag` to `tags` in SDK usage examples
TheUnderScorer Sep 2, 2026
f3ae504
refactor(e2e-app): improve error details display
TheUnderScorer Sep 2, 2026
db4a502
refactor(ios): simplify APIError code mapping logic
TheUnderScorer Sep 2, 2026
72cc382
refactor(errors): add detailed error codes and typings
TheUnderScorer Sep 2, 2026
db4f0ed
refactor(e2e-app): migrate to `@fingerprint/node-sdk` usage
TheUnderScorer Sep 2, 2026
5bf440f
refactor(e2e-app): replace `@fingerprintjs/pro-server-api` with `node…
TheUnderScorer Sep 3, 2026
aed2eac
docs(changeset): fix grammar in v4 migration guide
TheUnderScorer Sep 3, 2026
54f26b5
refactor(errors): adjust `FingerprintErrorCode` typing for clarity
TheUnderScorer Sep 3, 2026
fd2eaab
docs(build): clarify Kotlin metadata version compatibility
TheUnderScorer Sep 3, 2026
f09c09c
refactor(android): enhance error event ID handling logic
TheUnderScorer Sep 3, 2026
cdd5494
fix(ios): carry API error event ID into `FingerprintError.event_id`
Copilot Sep 3, 2026
7378017
refactor(errors): unify error handling across platforms
TheUnderScorer Sep 3, 2026
8132c69
test: test for event id in error test case
TheUnderScorer Sep 3, 2026
e719b0a
refactor(types): remove `null` from `TagValue` type definition
TheUnderScorer Sep 3, 2026
a189cea
feat: merge options
TheUnderScorer Sep 3, 2026
033f868
feat: handle deduplication and race conditions
TheUnderScorer Sep 3, 2026
fa30f8d
test: adjust assertion placement in useVisitorData tests
TheUnderScorer Sep 3, 2026
199f0a8
docs(sdk): update iOS version support to 14+
TheUnderScorer Sep 3, 2026
5b4c9a9
docs: update confidence mention
TheUnderScorer Sep 3, 2026
e7857bb
chore: update root readme
TheUnderScorer Sep 3, 2026
1c4b637
docs: add bottom separator to changeset
TheUnderScorer Sep 3, 2026
e429238
Merge remote-tracking branch 'origin/feature/INTER-2190-v4-support' i…
TheUnderScorer Sep 3, 2026
4581a8a
docs: add bottom separator to changeset
TheUnderScorer Sep 3, 2026
d4c6910
test: update API key in identification test setup
TheUnderScorer Sep 3, 2026
3ca9368
test: update error code in identification test
TheUnderScorer Sep 3, 2026
9126e06
docs(web): document caching option and usage in v4 API
TheUnderScorer Sep 3, 2026
1cd6501
docs: fix formatting and update terminology in README files
TheUnderScorer Sep 9, 2026
a77039e
docs: standardize visitor_id naming in documentation
TheUnderScorer Sep 9, 2026
89e3e81
Merge remote-tracking branch 'origin/feature/INTER-2190-v4-support' i…
TheUnderScorer Sep 9, 2026
5ded76a
feat(web): add `cache_hit` field to response types
TheUnderScorer Sep 9, 2026
f937fd0
docs(sdk): clarify sealed_result storage format
TheUnderScorer Sep 9, 2026
595b98c
feat: initialize isLoading state for immediate options
TheUnderScorer Sep 9, 2026
a1a28bd
feat: handle automatic request invalidation cleanup
TheUnderScorer Sep 9, 2026
71a0d03
refactor(types): rename `EndpointUrl` to `Endpoints`
TheUnderScorer Sep 9, 2026
015fc9d
test(sdk): add type compatibility tests for agent
TheUnderScorer Sep 9, 2026
42e28ba
chore(sdk): bump @fingerprint/agent to v4.1.5
TheUnderScorer Sep 9, 2026
0e4c620
refactor(types): rename `TagObject` to `TagsObject`
TheUnderScorer Sep 9, 2026
52e8794
test(sdk): enhance type compatibility checks for agent
TheUnderScorer Sep 10, 2026
23bc6cb
refactor(web): remove `remoteControlDetection` option
TheUnderScorer Sep 10, 2026
844cc03
refactor(types): rename `TagPrimitive` to `TagsPrimitive`
TheUnderScorer Sep 10, 2026
f94e086
docs(README): document `cache_hit` property in API response
TheUnderScorer Sep 10, 2026
0d8acb9
refactor(sdk): extract callbacks for request handling logic
TheUnderScorer Sep 10, 2026
dbbddaa
refactor(sdk): extract callbacks for request handling logic
TheUnderScorer Sep 10, 2026
31b9e31
fix(sdk): prevent redundant loading state updates
TheUnderScorer Sep 10, 2026
b683bcf
fix(sdk): reuse IDLE_STATE for clearing loading state
TheUnderScorer Sep 10, 2026
47296bc
refactor(sdk): simplify visitor data state management
TheUnderScorer Sep 10, 2026
acac23e
chore(eslint): add type-checking config for SDK type tests
TheUnderScorer Sep 10, 2026
f78d407
refactor: re-use part of React SDK logic for managing query state
TheUnderScorer Sep 10, 2026
037a3ca
refactor(sdk): update exported errors for explicit imports
TheUnderScorer Sep 10, 2026
7babb9c
fix(sdk): correct tag property in `get` method options
TheUnderScorer Sep 10, 2026
983325d
chore: remove version from podspec file
TheUnderScorer Sep 10, 2026
c424837
chore: restore version in podspec
TheUnderScorer Sep 11, 2026
c966abf
chore: sync podspec version with changeset version command
TheUnderScorer Sep 11, 2026
0ede0cd
fix(sdk): update error code in promise rejection
TheUnderScorer Sep 11, 2026
29fa6e7
docs: improve wording
TheUnderScorer Sep 11, 2026
1fcc272
refactor(sdk): remove unused error codes
TheUnderScorer Sep 14, 2026
39e4c74
Merge branch 'feature/INTER-970-new-arch' into feature/INTER-2190-v4-…
TheUnderScorer Sep 15, 2026
c082f9a
Merge branch 'feature/INTER-970-new-arch' into feature/INTER-2190-v4-…
TheUnderScorer Sep 15, 2026
3224180
docs: update platform version requirements
TheUnderScorer Sep 16, 2026
2423fa3
fix(e2e): update global type definition for turboModuleProxy
TheUnderScorer Sep 16, 2026
4fff849
Merge branch 'feature/INTER-970-new-arch' into feature/INTER-2190-v4-…
TheUnderScorer Sep 16, 2026
662d149
Merge branch 'feature/INTER-970-new-arch' into feature/INTER-2190-v4-…
TheUnderScorer Sep 17, 2026
dcdeece
fix(errors): unify network error codes across platforms
TheUnderScorer Sep 17, 2026
078b967
refactor(sdk): remove unused areGetOptionsEqual function
TheUnderScorer Sep 17, 2026
596375e
fix(sdk): resolve issue with in-place sed compatibility
TheUnderScorer Sep 17, 2026
15ed1c4
Merge branch 'feature/INTER-970-new-arch' into feature/INTER-2190-v4-…
TheUnderScorer Sep 18, 2026
d7587d5
fix(sdk): update iOS deployment target to 15.1
TheUnderScorer Sep 21, 2026
3d381e3
fix(sdk): update tvOS deployment target to 15.1
TheUnderScorer Sep 21, 2026
e016919
Merge branch 'main' into feature/INTER-2190-v4-support
TheUnderScorer Sep 21, 2026
5ddfc3d
fix(errors): rename and remove unused error codes
TheUnderScorer Sep 21, 2026
80fd3b9
fix: remove unused error codes
TheUnderScorer Sep 21, 2026
294c0cd
Merge branch 'main' into feature/INTER-2190-v4-support
TheUnderScorer Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions .changeset/v4-api-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
'@fingerprintjs/fingerprintjs-pro-react-native': major
---

Migrated the SDK to Fingerprint API v4 and realigned the public API with `@fingerprint/react`. This is a breaking change on every platform (web, iOS, Android).

**Renamed API**

- `FingerprintJsProProvider` → `FingerprintProvider`.
- `FingerprintJsProAgent` (constructed with `new`) → `start(options)`, returning a client with a single `get(options)` method (`getVisitorId`/`getVisitorData` are removed).
- Added `useFingerprint()` to read the client from context.

**Single options object**

- `getData(tags, linkedId, options)` → `getData({ tags, linkedId, timeout })`.
- `useVisitorData` now returns a discriminated union (`data`/`isLoading`/`isFetched`/`error`), and `getData` always throws on error. The `throwOnError` option is removed. `immediate` defaults to `false`.

**Grouped provider/start options**

- Platform-only options are nested: `android` (`allowUseOfLocationData`, `locationTimeoutMillis`), `ios` (`allowUseOfLocationData`), `web` (`storageKeyPrefix`, `urlHashing`, `cache`). `locationTimeoutMillisAndroid` moves to `android.locationTimeoutMillis`.
- `endpointUrl` + `fallbackEndpointUrls` are replaced by a single `endpoints` (string or string[]).

**snake_case response**

- The response is now the flat, snake_case `FingerprintResponse` (`visitor_id`, `event_id`, `suspect_score?`, `sealed_result`), matching the Server API v4 and JS agent. `requestId` is replaced by `event_id`, `confidence` is removed, and `suspect_score` is a new optional Smart Signals value; `sealedResult` is renamed to `sealed_result`. The nested extended fields (`ipLocation`, `firstSeenAt`, etc.) and the `extendedResponseFormat` option are removed (v4 always returns the flat format).

**Single error type**

- The ~28 error classes are replaced by a single `FingerprintError` (`{ name, code, event_id }`) plus an `isFingerprintError` type guard. Discriminate on `error.code` (e.g. `too_many_requests`).
- Every network failure reports `code: 'network_error'` on all platforms. The platform-specific `network_unavailable` (Android), `network_connection` and `network_abort` (web) codes are not emitted.

**Web**

- The web implementation now uses `@fingerprint/agent` (v4) instead of `@fingerprintjs/fingerprintjs-pro-spa`. Install `@fingerprint/agent` as the web peer dependency.
- ️Caching is available only on **web** and is disabled by default. To enable caching on web, pass the JavaScript agent [cache](https://docs.fingerprint.com/reference/js-agent-start-function#cache) option:
```jsx
<FingerprintProvider apiKey={'your-fpjs-public-api-key'} region={'eu'} web={{ cache: { storage: 'sessionStorage', duration: 'optimize-cost' } }}>
<App />
</FingerprintProvider>
```

**iOS**:
- The new version floor for iOS is **15.1**.

**Android**:
- The new version floor for Android is **Android 7.0 (API level 24+)**.

## Migration

**Provider**

```diff
- import { FingerprintJsProProvider } from '@fingerprintjs/fingerprintjs-pro-react-native'
+ import { FingerprintProvider } from '@fingerprintjs/fingerprintjs-pro-react-native'

- <FingerprintJsProProvider apiKey="PUBLIC_API_KEY" region="eu">
+ <FingerprintProvider apiKey="PUBLIC_API_KEY" region="eu">
<App />
- </FingerprintJsProProvider>
+ </FingerprintProvider>
```

**Hook (`useVisitorData`)**

```diff
- const { isLoading, error, data, getData } = useVisitorData()
+ const { isLoading, isFetched, error, data, getData } = useVisitorData()

// positional args + opt-in throwing → single options object, always throws
- await getData({ userAction: 'login' }, 'user_1234', { timeout: 5000, throwOnError: true })
+ await getData({ tags: { userAction: 'login' }, linkedId: 'user_1234', timeout: 5000 })

- data?.visitorId
- data?.confidence.score
+ data?.visitor_id
+ data?.suspect_score
```

**Imperative client**

```diff
- import { FingerprintJsProAgent } from '@fingerprintjs/fingerprintjs-pro-react-native'
+ import { start } from '@fingerprintjs/fingerprintjs-pro-react-native'

- const client = new FingerprintJsProAgent({ apiKey: 'PUBLIC_API_KEY', region: 'eu' })
- const visitorId = await client.getVisitorId()
- const data = await client.getVisitorData()
+ const fp = start({ apiKey: 'PUBLIC_API_KEY', region: 'eu' })
+ const result = await fp.get()
+ result.visitor_id
```

**Provider / start options**

```diff
{
apiKey: 'PUBLIC_API_KEY',
region: 'eu',
- endpointUrl: 'https://metrics.example.com',
- fallbackEndpointUrls: ['https://metrics2.example.com'],
+ endpoints: ['https://metrics.example.com', 'https://metrics2.example.com'],
- extendedResponseFormat: true,
- allowUseOfLocationData: true,
- locationTimeoutMillisAndroid: 5000,
+ android: { allowUseOfLocationData: true, locationTimeoutMillis: 5000 },
+ ios: { allowUseOfLocationData: true },
}
```

**Errors**

```diff
- import { TooManyRequestError } from '@fingerprintjs/fingerprintjs-pro-react-native'
+ import { isFingerprintError } from '@fingerprintjs/fingerprintjs-pro-react-native'

try {
await fp.get()
} catch (error) {
- if (error instanceof TooManyRequestError) {
+ if (isFingerprintError(error) && error.code === 'too_many_requests') {
// handle rate limiting
}
}
```

**Web peer dependency**

```diff
- npm install @fingerprintjs/fingerprintjs-pro-spa
+ npm install @fingerprint/agent
```

---
Loading
Loading