Skip to content

Commit

Permalink
docs(README): add how to specify a custom timeout block
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Dec 6, 2024
1 parent af51339 commit 66fb0bd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,22 @@ void identify() async {
}
```

### Specifying a custom timeout

*Default timeout value:*
- iOS: 60 seconds
- Android: not specified
- Web: 10 seconds

You can override the default timeout with a custom value of your choice. If the `getVisitorId()` or `getVisitorData()` call does not complete within the specified (or default) timeout, you will receive a `ClientTimeoutError` error.

```dart
void identify() async {
visitorId = await FpjsProPlugin.getVisitorId(timeoutMs: 10000);
deviceData = await FpjsProPlugin.getVisitorData(timeoutMs: 10000);
}
```

## Additional Resources
- [Server-to-Server API](https://dev.fingerprint.com/docs/server-api)
- [Fingerprint Pro documentation](https://dev.fingerprint.com/docs)
Expand Down

0 comments on commit 66fb0bd

Please sign in to comment.