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.
react-native-biometry-module
Advanced tools
## A UI library support biometry authentication with passcode fallback for React Native
yarn add git+https://github.com/dangttp97/rn-biometry-module
import {Biometry, ScreenType} from 'react-native-biometry-module'
/*
Your render method
*/
return <Biometry type={ScreenType.select} biometryEnabled />
ScreenType
Type of screen to show. Includes:
select
Set passcode screen.input
Input passcode screen.changePasscode
Change passcode screen.Key | Type | Default | Description |
---|---|---|---|
type | ScreenType | Type of screen to display | |
numberOfAttempts | number undefined | 3 | Number of max attempts before screen is locked |
lockedTime | number undefined | 300000 | Locked time in millisecond before screen unlocked. |
alphabetCharsVisible | boolean undefined | false | Is alphabet characters show below numeric char in keypad |
biometryEnabled | boolean | Is using biometry for authenticate user | |
passcodeVisible | boolean undefined | false | Is passcode input visible |
timePasscodeLockedAsyncStorageName | string undefined | undefined | Locked time AsyncStorage save key |
passcodeKeychainName | string undefined | undefined | Key for saving passcode to keychain system |
passcodeAttemptsAsyncStorageName | string undefined | undefined | Key for saving number of failed attempts in AsyncStorage |
onSuccess | (passcode: string) => void undefined | undefined | Handler for confirm passcode success, input passcode success, biometry success |
onFailed | (error?: any) => void undefined | undefined | Handler for confirm failed, input passcode failed, biometry failed |
passcodeSelectTitle | string undefined | undefined | Title for select passcode screen |
passcodeSelectSubtitle | string undefined | undefined | Subtitle for select passcode screen |
passcodeSelectErrorTitle | string undefined | undefined | Title for select passcode screen when error |
passcodeSelectErrorSubtitle | string undefined | undefined | Subtitle for select passcode screen when error |
passcodeConfirmTitle | string undefined | undefined | Title for confirm passcode screen |
passcodeConfirmSubtitle | string undefined | undefined | Subtitle for confirm passcode screen |
passcodeConfirmErrorTitle | string undefined | undefined | Title for confirm passcode screen when error |
passcodeConfirmErrorSubtitle | string undefined | undefined | Subtitle for confirm passcode screen when error |
passcodeInputTitle | string undefined | undefined | Title for input passcode screen |
passcodeInputSubtitle | string undefined | undefined | Subtitle for input passcode screen |
passcodeInputErrorTitle | string undefined | undefined | Title for input passcode screen when error |
passcodeInputErrorSubtitle | string undefined | undefined | Subtitle for input passcode screen when error |
lockedTitle | string undefined | undefined | Title for locked screen |
lockedSubtitle | (timer: number) => string undefined | undefined | Subtitle with remain locked time for locked screen |
Key | Type | Default | Description |
---|---|---|---|
deleteButtonIcon | JSX.Element undefined | undefined | Set icon for delete button keypad |
biometryButtonIcon | JSX.Element undefined | undefined | Set icon for biometry trigger keypad (bottom left button) |
lockedButton | JSX.Element undefined | undefined | Locked page button |
lockedPage | JSX.Element undefined | undefined | Custom locked page |
bottomLeftButton | JSX.Element undefined | undefined | Custom bottom left button (biometry trigger button) |
deleteButton | (handler: () => void) => JSX.Element undefined | undefined | Custom delete button keypad with handler method in module |
keypadButton | (index: number, handler: (buttonIndex: string) => void) => JSX.Element undefined | undefined | Custom keypad button with handler and button index |
Key | Type | Default | Description |
---|---|---|---|
styleLockedContainer | StyleProp<ViewStyle> undefined | undefined | Style of locked screen's container |
styleLockedTextContainer | StyleProp<ViewStyle> undefined | undefined | Style of locked screen text container |
styleLockedTitle | StyleProp<TextStyle> undefined | undefined | Style of locked screen's container |
styleLockedSubtitle | StyleProp<TextStyle> undefined | undefined | Style of locked screen's container |
styleLockedTimerContainer | StyleProp<ViewStyle> undefined | undefined | Style of locked screen's timer container |
styleLockedTimerText | StyleProp<TextStyle> undefined | undefined | Style of locked screen's timer text |
styleLockedIconContainer | StyleProp<ViewStyle> undefined | undefined | Style of locked screen's center icon container |
stylePasscodeContainer | StyleProp<ViewStyle> undefined | undefined | Style of passcode container |
stylePasscodeTitle | StyleProp<TextStyle> undefined | undefined | Style of passcode title |
stylePasscodeSubtitle | StyleProp<TextStyle> undefined | undefined | Style of passcode subtitle |
stylePasscodeHidden | StyleProp<ViewStyle> undefined | undefined | Style of passcode indicator when hidden |
stylePasscodeText | StyleProp<TextStyle> undefined | undefined | Style of passcode indicator when show text |
styleKeypadAlphabetCharHighlighted | StyleProp<TextStyle> undefined | undefined | Style of alphabet chars when keypad pressed |
styleKeypadNumberCharHighlighted | StyleProp<TextStyle> undefined | undefined | Style of numeric chars when keypad pressed |
styleKeypadAlphabetCharNormal | StyleProp<TextStyle> undefined | undefined | Style of alphabet chars when keypad normal |
styleKeypadNumberCharNormal | StyleProp<TextStyle> undefined | undefined | Style of numeric chars when keypad normal |
async hasUserSetPasscode(serviceName?: string) => Promise<boolean>
Returns a promise contains if passcode had been set or not
async deleteUserPasscode(serviceName?: string) => Promise<void>
Delete keychain stored passcode if existed
async resetPasscodeInternalStates = (passcodeAttempsStorageName?: string, timePasscodeLockedStorageName?: string) => Promise<void>
Reset all app internal state (time countdown for lock screen, number of fail attempts)
FAQs
## A UI library support biometry authentication with passcode fallback for React Native
The npm package react-native-biometry-module receives a total of 1 weekly downloads. As such, react-native-biometry-module popularity was classified as not popular.
We found that react-native-biometry-module 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.
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.