
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@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 @caf.io/react-native-face-liveness
# or
npm install @caf.io/react-native-face-liveness
import React from 'react';
import { View, Button, StyleSheet } from 'react-native';
import {
startFaceLiveness,
useFaceLiveness,
FaceLivenessOptions,
StageType,
FilterType,
TimeType
} from '@caf.io/react-native-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 {
result,
error,
cancelled,
isLoading
} = useFaceLiveness(options);
return (
<View style={styles.container}>
<Button
title="Press"
onPress={() => startFaceLiveness(mobileToken, peopleId)}
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
});
This method inicialize the face liveness.
Param | Type | Default | Description |
---|---|---|---|
mobileToken | string | Required | Usage token associated with your Identity account |
peopleId | string | Required | User CPF |
This hook provides the responses of method startFaceLiveness
and make the settings for face liveness.
Param | Type | Default | Description |
---|---|---|---|
options | FaceLivenessOptions | Optional | Settings for the face liveness |
FaceLivenessResponse
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 | Development 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
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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.