FaceAuthenticator
Incorporate facial authentication with proof of life verification and fingerprint authentication technology into your Flutter application. This integration is ideal for enhancing login flows and secur
Check out the SDK documentation in pub.dev to get more examples and extra information:
Requirements
Flutter | Version |
---|---|
Flutter | 1.20+ |
Dart | 2.15+ |
Android | Version |
---|---|
minSdk | 21 |
compileSdk | 33 |
iOS | Version |
---|---|
iOS Target | 13.0 |
Xcode | 15.4+ |
Swift | 5.3.2+ |
Sending your app to Play Store
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 |
---|---|
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. |
Runtime permissions
Android
Permission | Reason | Required |
---|---|---|
| Capturing the selfie in policies with facial re-authentication | Yes |
iOS
Permission | Reason | Required |
---|---|---|
| Capturing the selfie in live facial verification policies | Yes |
Platform Configurations
Android
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.
iOS
In the info.plist
file, add the permissions below:
Usage
Parameter | Required |
---|---|
| Yes |
| Yes |
FaceAuthenticator Options
Option | Required | Default Value | Android | iOS |
---|---|---|---|---|
Used to redirect the SDK to the desired environment in caf api. | No |
| ✅ | ✅ |
Set the camera filter applied to the camera preview. | No |
| ✅ | ✅ |
Used to enable screenshots during the SDK scan. | No |
| ✅ | ❌ |
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 |
| ✅ | ✅ |
Use to change the default image URL expiration time to retrieve the facial capture. | No | 30 min | ✅ | ✅ |
Enums
CafStage
Description | Values |
---|---|
Used to set the SDK stage on |
|
CameraFilter
Description | Values |
---|---|
Used to set the SDK's camera filter on |
|
Time
Description | Values |
---|---|
Used to set the image URL expiration time on |
|
FaceAuthenticator Stream Events
FaceAuthenticatorEventConnecting
The SDK is loading, you can use this event return to set an action in your app, for example, a loading indicator.
FaceAuthenticatorEventConnected
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.
FaceAuthenticatorEventClosed
The execution has been cancelled by the user.
FaceAuthenticatorEventSuccess
Parameter |
---|
Signed response from the CAF server confirming that the captured selfie has a real face. This parameter is used to get an extra layer of security, checking that the signature of the response is not broken, or caused by request interception. If it is broken, there is a strong indication of request interception. |
signedResponse params
Parameter | Description |
---|---|
| Request identifier. |
| Validation of a living person, identifies whether the user passed successfully or not. |
| Face match validation result. |
| Request token. |
| User identifier provided for the request. |
| Temporary link to the image, generated by our API. |
| User identifier provided for the SDK. |
| Sdk version in use. |
| Token expiration. |
| Return message. |
The
isAlive
parameter is very important, as it dictates whether the validation process proceeds or halts. WhenisAlive: true
, the user gains passage to continue their journey; conversely, ifisAlive: false
, the user is deemed invalid and access to further stages of the journey should be denied. Additionally, theisMatch
parameter indicates the success or failure of the face match, returningisMatch: true
for successful matches andisMatch: false
otherwise. This parameters plays a pivotal role in guiding the flow of operations.
FaceAuthenticatorEventFailure
Parameter | Description |
---|---|
| Error type returned by the SDK |
| Error description message returned by the SDK. |
Error type cases | Description |
---|---|
| This error may occur if the device hardware or software does not meet the minimum requirements for facial recognition functionality. |
| This error typically occurs when the user denies access to the camera or if the app lacks the necessary permissions. |
| This error may occur due to various network issues such as a lack of internet connection, server timeouts, or network congestion. |
| This error may occur if the provided authentication token is invalid, expired, or lacks the necessary permissions to perform facial recognition tasks. |
| 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. |
Last updated