Mauin / RxFingerprint

Android Fingerprint authentication and encryption with RxJava
Apache License 2.0
379 stars 81 forks source link

Too many tries should be a recoverable error #92

Open ndori opened 6 years ago

ndori commented 6 years ago

com.mtramin.rxfingerprint.data.FingerprintAuthenticationException: Too many attempts. Try again later.

in this case onError is called which will end the stream, however, this is a recoverable error, all you need to do it try again later...

Mauin commented 6 years ago

Too many tries result in the Fingerprint API returning an error callback and locking the fingerprint sensor. It is not possible to easily recover or know the timeout that the fingerprint sensor will be in lockdown. This is why this case is translated to an error. The user should actively prompt the app to try again to enable the fingerprint sensor.

I feel like adding internal retry logic to RxFingerprint would defeat the purpose of this error as it is there for security reasons.