Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-fingerprint-identify
Advanced tools
A cool package for authenticate with Fingerprint sensor on Android device
Fingerprint android auth for react-native (Android only).
This is an expandable Android fingerprint API compatible lib, which also combines Samsung and MeiZu's official Fingerprint API.
Samsung and MeiZu's fingerprint SDK supports most devices which system versions less than Android 6.0.
Api priority level:Android > Samsung > MeiZu, Xiaomi,...
$ npm install react-native-fingerprint-identify --save
$ react-native link react-native-fingerprint-identify
android/app/build.gradle
:android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
...
defaultConfig {
targetSdkVersion 25
android/app/src/main/java/[...]/MainApplication.java
Add import com.fingerprint.identify.RNFingerprintIdentifyPackage;
to the imports at the top of the file
Add new RNFingerprintIdentifyPackage()
to the list returned by the getPackages()
method
android/settings.gradle
: include ':react-native-fingerprint-identify'
project(':react-native-fingerprint-identify').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fingerprint-identify/android')
android/app/build.gradle
:android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
...
defaultConfig {
targetSdkVersion 25
android/app/build.gradle
in dependencies block
compile project(':react-native-fingerprint-identify')
Please clone repo and look on the example project to get more details
import FingerprintIdentify from 'react-native-fingerprint-identify';
import { Platform } from 'react-native'
// Make sure you run in Android Platform condition
scanFingerprint = async () => {
if (Platform.OS === 'android') {
try {
const initFingerPrintIdentify = await FingerprintIdentify.initFingerPrintIdentify()
const isSensorAvailable = await FingerprintIdentify.isSensorAvailable()
if (initFingerPrintIdentify && isSensorAvailable) {
await FingerprintIdentify.startIdentify((status) => {
console.log(status)
})
}
} catch (error) {
console.log(error)
return
}
}
}
ERROR_NOT_AVAILABLE
ERROR_NOT_MATCH
ERROR_NOT_MATCH_AND_CHANCES_LEFT:(AvailableTimes)
ERROR_HARDWARE: The device does not support fingerprint scanning.
ERROR_ENROLLED: No fingerprints registered.
ERROR_PERMISSION: App has no permission.
ERROR_INITIALIZED: The FingerPrintIdentify can not initialize
FingerprintIdentify.initFingerPrintIdentify()
FingerprintIdentify.isSensorAvailable()
FingerprintIdentify.startIdentify((val) => console.log(val))
FingerprintIdentify.dismiss()
FingerprintIdentify.cancelIdentify()
If you make five wrong fingerprint attempts, Android Fingerprint API requires some time to continue work on the sensor.
In that case FingerprintIdentify.startIdentify()
locked out, so it would be good to make the user aware that sensor is temporarily unavailable (near 30 seconds).
Feel free to open an issue
If this project help you reduce time to develop, you can give me a cup of coffee :)
FAQs
A cool package for authenticate with Fingerprint sensor on Android device
We found that react-native-fingerprint-identify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.