FaceLiveness
It brings cutting-edge live facial verification and fingerprint authentication technology into your Flutter applications, offering a seamless and secure way to authenticate users.
Last updated
It brings cutting-edge live facial verification and fingerprint authentication technology into your Flutter applications, offering a seamless and secure way to authenticate users.
Last updated
2023 © Caf. - All rights reserved
Check out the SDK documentation in pub.dev to get more examples and extra information:
Flutter | Version |
---|---|
Android | Version |
---|---|
iOS | Version |
---|---|
To publish your app on the Google Play Store, you must complete a data safety form. Since we integrate with the FingerPrintJS SDK, you'll need to provide the following information:
Question in Google Play Console's data safety form | Response |
---|---|
If your version of Gradle is earlier than 7, add these lines to your build.gradle
.
If your version of Gradle is 7 or newer, add these lines to your settings.gradle
.
Add support for Java 8 to your build.gradle
file. Skip this if Java 8 is enabled.
In the info.plist
file, add the permissions below:
The reverse proxy settings that will be used to run the FaceLiveness and Authentication services. These two services can operate independently of each other, FaceLiveness and Authentication.
FaceLiveness reverse proxy:
Authentication reverse proxy:
The SDK is loading, you can use this event return to set an action in your app, for example, a loading indicator.
The SDK is not loading anymore, you can use this event return to set a action in your app, for example, you can stop your loading indicator.
The execution has been cancelled by the user.
The isAlive
parameter is very important, based on this validation, the user can be guided to continue the flow or not. In case of isAlive: true
, it would be able to continue with the journey. If isAlive: false
, this user is not valid and should be prevented from continuing their journey.
Permission | Reason | Required |
---|---|---|
Permission | Reason | Required |
---|---|---|
Parameter | Required |
---|---|
Option | Required | Default Value | Android | iOS |
---|---|---|---|---|
Parameter | Description |
---|---|
Parameter | Description |
---|---|
Description | Values |
---|---|
Description | Values |
---|---|
Description | Values |
---|---|
Event | Description |
---|---|
Parameter | Description |
---|---|
Error type cases | Description |
---|---|
Flutter
1.20+
Dart
2.15+
minSdk
21
compileSdk
34
iOS Target
13.0
Xcode
15.4+
Swift
5.3.2+
Does your app collect or share any of the required user data types?
Yes.
What type of data is collected?
Device or other identifiers.
Is this data collected, shared, or both?
Collected.
Is this data processed ephemerally?
Yes.
Why is this user data collected?
Fraud Prevention, Security, and Compliance.
CAMERA
Capturing the selfie in policies with facial verification
Yes
Privacy - Camera Usage Description
Capturing the selfie in live facial verification policies
Yes
mobileToken
: Usage token associated with your CAF account
Yes
personId
: User identification that registers the user's face for face matching. Currently, this value only accepts the user's CPF.
Yes
.setStage(String stage)
Used to redirect the SDK to the desired environment in caf api.
No
CafStage.prod
✅
✅
.setFilter(String filter)
Set the camera filter applied to the camera preview.
No
CameraFilter.lineDrawing
✅
✅
.setEnableScreenshots(bool enable)
Used to enable screenshots during the SDK scan.
No
false
✅
❌
.setEnableLoadingScreen(bool enable)
Used to determines whether the SDK's loading screen will be implemented through client side or if will be used the default screen. If set to 'true,' the loading screen will be a standard SDK screen. If 'false,' You should provide an indeterminate progress indicator.
No
false
✅
✅
.setImageUrlExpirationTime(String time)
Use to change the default image URL expiration time to retrieve the facial capture.
No
30 min
✅
✅
.setReverseProxySettings(ReverseProxySettings settings)
Use to configure the reverse proxy settings for running the FaceLiveness and/or Authentication services.
No
✅
❌
String? faceLivenessBaseUrl
The base URL of the reverse proxy that will be used to run the FaceLiveness service. The URL's protocol must be WSS.
List<String>? certificates
A list of certificates that will be used to authenticate the reverse proxy to run the FaceLiveness service. The certificates must be base64-encoded SHA-256 hash of certificate' Subject Public Key Info.
String? authenticationBaseUrl
The base URL of the reverse proxy that will be used to run the Authentication service. The URL's protocol must be HTTPS.
Used to set the SDK stage on .setStage(String stage)
option.
CafStage.prod
, CafStage.beta
Used to set the SDK's camera filter on .setFilter(String filter)
option.
CameraFilter.natural
, CameraFilter.lineDrawing
Used to set the image URL expiration time on .setImageUrlExpirationTime(String time)
option.
Time.threeHours
, Time.thirtyDays
requestId
Request identifier.
isAlive
Validation of a living person, identifies whether the user passed successfully or not.
token
Request token.
userId
User identifier provided for the request.
imageUrl
Temporary link to the image, generated by our API.
personId
User identifier provided for the SDK.
sdkVersion
Sdk version in use.
iat
Token expiration.
String errorType
Error type returned by the SDK
String errorDescription
Error description message returned by the SDK.
unsupportedDevice
This error may occur if the device hardware or software does not meet the minimum requirements for facial recognition functionality.
cameraPermission
This error typically occurs when the user denies access to the camera or if the app lacks the necessary permissions.
networkException
This error may occur due to various network issues such as a lack of internet connection, server timeouts, or network congestion.
tokenException
This error may occur if the provided authentication token is invalid, expired, or lacks the necessary permissions to perform facial recognition tasks.
serverException
This error is typically returned when there is an issue with the server processing the facial recognition request. This could include server-side errors, misconfigurations, or service interruptions.