HomeiOS DevelopmentThe best way to use ios FACE ID Authentication utilizing expo-local-authentication in...

The best way to use ios FACE ID Authentication utilizing expo-local-authentication in react-native


For ios system i’ve used NSFaceIDUsageDescription
Authentication
however nonetheless its not exhibiting permission on ios for faceID authentication

my Data.plist file is called by GoogleService-Data.plist

I’m engaged on react-native utilizing webstorm as code editor

const biometricAuthentication = async () => {
        // getting the information saved in LocalStorage of Cellular
        getStoredData().then(async (storedData: any) => {
                if (storedData != null) {
                    // Examine for {hardware} compatibility for biometric
                    await setIsBiometricSupported(await LocalAuthentication.hasHardwareAsync());
                    if (isBiometricSupported) {
                        // Examine for saved Biometrics
                        const savedBiometrics = await LocalAuthentication.isEnrolledAsync();
                        if (savedBiometrics) {

                            // Authentication by  biometrics
                            await LocalAuthentication.authenticateAsync().then(async (biometricResponse: any) => {
                                if (biometricResponse.success) {
                                    // Receiving knowledge by API
                                    const receivingData = await AuthApi.loginViaBiometric()
                                    if (receivingData && storedData.customerRefNo == receivingData.customerRefNo) {
                                        await biometricLogin(dispatch, storedData);
                                    }
                                } else {

                                    handleAppLoading().then()
                                }
                            })
                        }
                    }
                } else {
                    handleAppLoading().then()
                }
            }
        )
    }

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments