Hooks
useSupportBiometrics
How to use it?
import useSupportBiometrics from 'LinkerStudio/modules/authentication/Biometrics/hooks/useSupportBiometrics';const [isSupportedTouchID, isSupportedFaceID] = useSupportBiometrics();How to get biometrics support?
import {CONFIG_VALUES} from 'LinkerStudio/modules/authentication/Biometrics/constants';import TouchID from 'react-native-touch-id';const getIsSupportedBiometrics = async () => {
try {
const biometryType = await TouchID.isSupported();
if (biometryType === CONFIG_VALUES.biometricsFaceID) {
// faceID is supported
}
if (biometryType === CONFIG_VALUES.biometricsTouchID) {
// touchID is supported
}
} catch (error) {
return error
}
};Last updated