You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A great feature to add would be to detect biometry type for Android/iOS devices, by using this below library react-native-biometrics
If we can create a service or a utility in bifold to detect Biometry type we can guide the users accordingly, a utility function that can be used in a context provider and used by wallets to enhance User experience.
A Sample code that we could use below:
import Biometry, { BiometryType } from 'react-native-biometrics'
export interface IsSensorAvailableResult {
available: boolean
biometryType?: BiometryType
error?: string
}
export interface SimplePromptResult {
success: boolean
error?: string
}
export function serviceGetBiometryDescription(biometryType: BiometryType | undefined): string {
switch (biometryType) {
case Biometry.TouchID:
return Biometry.TouchID
case Biometry.FaceID:
return Biometry.FaceID
case 'Biometrics':
return 'Biometrics'
default:
throw new Error('We do not support this type of biometry')
}
}
export function serviceAuthenticateWithBiometrics(promptMessage: string): Promise<SimplePromptResult> {
return Biometry.simplePrompt({
promptMessage: promptMessage,
})
}
export function serviceGetEnrolledBiometry(): Promise<IsSensorAvailableResult> {
return Biometry.isSensorAvailable()
}
export async function biometryType(): Promise<BiometryType | undefined> {
let biometryType: BiometryType | undefined
await Biometry.isSensorAvailable().then((resultObject) => {
biometryType = resultObject.biometryType
})
return biometryType
}
This can be used across different wallets as a utility service.
Acceptance Criteria
A Hook for biometryType that can detect the device type and it can be used by other wallets as a custom hook.
Wireframes or relevant image assets / links
The text was updated successfully, but these errors were encountered:
@jleach This can be closed. In a previous discussion it was pointed out that react-native-keychain which is already in the wallet can be used to get the Biometry type.
A utility function could be useful, but currently there no longer any plans to submit a PR for this issue.
Description of feature / user story
A great feature to add would be to detect biometry type for Android/iOS devices, by using this below library
react-native-biometrics
If we can create a service or a utility in bifold to detect Biometry type we can guide the users accordingly, a utility function that can be used in a context provider and used by wallets to enhance User experience.
A Sample code that we could use below:
This can be used across different wallets as a utility service.
Acceptance Criteria
A Hook for biometryType that can detect the device type and it can be used by other wallets as a custom hook.
Wireframes or relevant image assets / links
The text was updated successfully, but these errors were encountered: