smstuebe / xamarin-fingerprint

Xamarin and MvvMCross plugin for authenticate a user via fingerprint sensor
Microsoft Public License
490 stars 115 forks source link

Android: Don't show dialog while TooManyAttempts error is active #48

Closed nielscup closed 4 years ago

nielscup commented 7 years ago

Steps to reproduce

Using the SMS.Fingerprint.Sample.Droid app with MyCustomDialogFragment on a Samsung device

  1. Start app
  2. Press AuthenticateLocalized
  3. Authenticate with wrong finger until dialog disappears and TooManyAttempts message shows
  4. Press AuthenticateLocalized again Result: Dialog appears => dialog disappears => TooManyAttempts message shows.

Expected behavior

On a non Samsung device the dialog does not appear. I would prefer/expect this behaviour for a Samsung device as well.

Actual behavior

Dialog appears => dialog disappears => TooManyAttempts message shows.

Crashlog

n/a

Configuration

Version of the Plugin: 1.4.2

Platform: Android 6.0.1

Device: Galaxy S7

smsissuechecker commented 7 years ago

Hi @nielscup,

I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

smstuebe commented 7 years ago

Is it the same with the default dialog?

nielscup commented 7 years ago

When using the default dialog the dialog is always shown. So only the custom dialog does not show on a non-Samsung device. Any way to have this behaviour on a Samsung device as well? I have looked through the code but it wasn't very obvious how to fix this. Maybe if you can point me in the right direction I can have another look. Thanks!

smstuebe commented 7 years ago
Device Default Dialog Custom Dialog
Samsung shows normally disappears immediately (wrong behavior)
Other shows normally shows normally

correct?

nielscup commented 7 years ago

Not exactly: I would like the dialog not to popup at all while TooManyAttempts is active. I would like to receive the TooManyAttempts message from AuthenticateAsync while it is active, without showing a popup. Just like the title of this issue says: Don't show dialog while TooManyAttempts error is active. I get this (correct) behaviour on non-Samsung devices, but not on a Samsung. Samsung always pops up the dialog shortly if you can't use fingerprint because it is blocked.

TheSayvior commented 6 years ago

Hello, I'm exspriencing what is think is the same issue on android in my Xamarin project on my Nexus 5. Once i have gotten the TooManyAttempts error then it saves that error untill it have been evaluated a sekund time or enough time has passed. This behavior does not show/happen on my iOS device.

Sorry for messing up the formular but since its already here i think I'll just supply what i think is different @smsissuechecker :)

Configuration Version of the Plugin: 1.4.7 Platform: Android 8.1.0 Device: Nexus 5

Exspected behavior: When i start a new
result = await CrossFingerprint.AuthenticateAsync(new AuthenticationRequestConfiguration()); after having had the result status of TooMany Attempts prior to starting a new, then it waits for me to use my finger and does not reuse the same result from last time the Authendication was called and evaluated to TooManyAttempts.

Actual behavior: When the Authendication has evaluated to tooManyAttempts, the device remembers this for a duration of time and will throw that result again instantly next time I call the authendication havent gotten the time but its +5-10 sekunds that the device or plugin remembers the result status of tooManyAttempts.

smstuebe commented 4 years ago

lifecycle is now completely managed by biometric prompt