React Native Turbo Module for AWS Amplify Face Liveness Detection with multi-language support and secure credential management.
npm install aws-liveness-turbo-modules
# or
yarn add aws-liveness-turbo-modules
✨ Auto-Configuration: The package automatically configures your Android project during installation. No manual setup required!
import AwsLivenessTurboModules from 'aws-liveness-turbo-modules';
import { DeviceEventEmitter } from 'react-native';
// Start face liveness detection
const startLiveness = async () => {
try {
const result = await AwsLivenessTurboModules.startFaceLivenessDetection(
'session-id',
'access-key-id',
'secret-key',
'session-token',
'expiration-date'
);
console.log('Liveness started:', result);
} catch (error) {
console.error('Liveness error:', error);
}
};
// Listen for results
DeviceEventEmitter.addListener('FaceLivenessComplete', (data) => {
console.log('Liveness completed:', data);
});
DeviceEventEmitter.addListener('FaceLivenessError', (error) => {
console.error('Liveness error:', error);
});
- 🔐 AWS Amplify Integration - Native integration with AWS Amplify Face Liveness
- 🌍 Multi-language Support - Portuguese and English interfaces
- 📱 React Native Turbo Module - High-performance native implementation
- 🎨 Jetpack Compose UI - Modern Android interface with dark mode support
- 🔒 Secure Credential Management - Built-in credential rotation support
- 📋 Permission Handling - Automatic camera permission management
- 🎯 TypeScript Support - Full TypeScript definitions included
- React Native >= 0.70.0
- React >= 18.0.0
- Android API Level >= 24
- AWS Amplify account with Face Liveness enabled
The package automatically configures your Android project during installation:
- ✅ Adds required permissions to
AndroidManifest.xml
- ✅ Adds AWS Amplify dependencies to
build.gradle
- ✅ Copies native Kotlin files to your project
- ✅ Updates
MainApplication.java
to include the module
If automatic configuration fails, run:
npm run setup-manual
This will show you step-by-step instructions for manual setup.
- Add permissions to
android/app/src/main/AndroidManifest.xml
:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
- Add dependencies to
android/app/build.gradle
:
dependencies {
implementation 'com.amplifyframework:aws-auth-cognito:2.0.0'
implementation 'com.amplifyframework:aws-predictions:2.0.0'
implementation 'androidx.compose.ui:ui:1.5.0'
implementation 'androidx.compose.material3:material3:1.1.0'
}
- Configure AWS Amplify in your app
- Add camera permission to
ios/YourApp/Info.plist
:
<key>NSCameraUsageDescription</key>
<string>This app needs camera access for face liveness detection</string>
- Install AWS Amplify iOS dependencies
- Complete Documentation (PT) - Documentação completa em Português
- Complete Documentation (EN) - Complete documentation in English
- Integration Guide - How to integrate into existing projects
- Security Guide - Secure credential rotation and management
- Documentation Index - Index of all available documentation
This module includes built-in support for secure AWS credential rotation. See the Security Guide for implementation details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: See the documentation files above
- Community: React Native community forums
Made with ❤️ for the React Native community