Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@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 355 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.