biometric_storage icon indicating copy to clipboard operation
biometric_storage copied to clipboard

5.0.1-dev.1 returns CanAuthenticate.sucess if device has no credentials set

Open SylvainLosey opened this issue 1 year ago • 4 comments

Hello,

I might be misunderstanding something, but it seems that the latest dev version has an oversight where canAuthenticate would return successfully whenever the device has no credentials enrolled. This does not seem like the expected behavior, am I missing something ?

        val credentialsResponse = biometricManager.canAuthenticate(DEVICE_CREDENTIAL);
        logger.debug { "canAuthenticate for DEVICE_CREDENTIAL: $credentialsResponse" }
        if (credentialsResponse == BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED) {
            return CanAuthenticateResponse.Success
        }

Thanks a lot for the great package, Sylvain

SylvainLosey avatar Oct 18 '23 10:10 SylvainLosey