
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@caf.io/react-native-face-liveness
Advanced tools
Library for React Native
Settings | Minimum version |
---|---|
minSdkVersion | 21 |
compileSdkVersion | 33 |
Java version | 8 |
Settings | Minimum version |
---|---|
Target | 12 |
Xcode | 13.4.1 |
yarn add react-native-caf-face-liveness
# or
npm install react-native-caf-face-liveness
import React from 'react';
import { View, Button, StyleSheet } from 'react-native';
import {
useFaceLiveness,
FaceLivenessOptions,
StageType,
FilterType,
TimeType
} from 'react-native-caf-face-liveness';
export default function App() {
const mobileToken: string = "";
const peopleId: string = "";
const options: FaceLivenessOptions = {
cafStage: StageType.PROD;
filter: FilterType.NATURAL;
imageUrlExpirationTime: TimeType.THREE_HOURS;
enableScreenshots: true;
loadingScreen: true;
} // optional
const {
startFaceLiveness,
result,
error,
cancelled,
isLoading
} = useFaceLiveness(mobileToken, peopleId, options);
return (
<View style={styles.container}>
<Button title="Press" onPress={startFaceLiveness} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
});
This hook provides startFaceLiveness
method that start face liveness and your responses.
Param | Type | Default | Description |
---|---|---|---|
mobileToken | string | Required | Usage token associated with your Identity account |
peopleId | string | Required | User CPF |
options | FaceLivenessOptions | Optional | Settings for the face liveness |
Method | Params | Response | Descriptions |
---|---|---|---|
startFaceLiveness | void | void | Method that start face liveness |
Name | Type | Description |
---|---|---|
result | string or null | Shows when face liveness returns a successful capture |
error | string or null | Shows when the face livenes return some error |
cancelled | boolean | Shows when user cancel the liveness |
isLoading | boolean | Shows when the face liveness is loading |
Name | Type | Description |
---|---|---|
cafStage | StageType | Change the development environment |
filter | FilterType | Change face liveness mask |
imageUrlExpirationTime | TimeType | Change the expiration time of the face liveness url |
enableScreenshots | boolean | Toggle user screenshots |
loadingScreen | boolean | Toggle face liveness loading screen |
Enum | Description |
---|---|
BETA | Beta environment |
PROD | Production environment |
DEV | Develppment environment |
Enum | Description |
---|---|
LINE_DRAWING | Alternative mask for face liveness |
NATURAL | Normal mask for face liveness |
Enum | Description |
---|---|
THREE_HOURS | Image url expiration time expires in three hours |
THIRTY_DAYS | Image url expiration time expires in thirty days |
THIRTY_MIN | Image url expiration time expires in thirty minutes |
FAQs
CAF React Native library for face liveness
The npm package @caf.io/react-native-face-liveness receives a total of 231 weekly downloads. As such, @caf.io/react-native-face-liveness popularity was classified as not popular.
We found that @caf.io/react-native-face-liveness demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.