twofas / 2fas-ios

Source code for 2FAS iOS app
GNU General Public License v3.0
505 stars 38 forks source link

Face ID verified only after app restart #47

Closed mbart13 closed 11 months ago

mbart13 commented 11 months ago

Hi, I noticed strange behavior on iOS 17.0.2, or maybe it was always like this. When I have only PIN set without Face ID, everything works as expected. When app is put to background and I switch to different app, then back to 2fas, I'm prompted to enter PIN. It doesn't work like that when I enable Face ID, 2fas seems to be always unlocked then. Only when I close application and restart it, then Face ID is verified.

adocyn commented 11 months ago

@mbart13 It always worked like this. It's because iOS Face ID API returns authorized after first authorization and for every subsequent one (within some limits). It works the same way if you unlock the phone and run 2FAS immediately after that. Somehow they know the phone didn't change hands.

mbart13 commented 11 months ago

@adocyn Maybe you are right, but you can check out new Google Authenticator with privacy option enabled. Face ID is always verified

SebTota commented 8 months ago

I see this issue is marked as closed, but would you be open to adding this as a feature if a PR was raised for it? On top of this being the behavior of Google Authenticator, this is also how the Authy iOS app behaves with the 'Protect Entire App' setting enabled.

I imagine 2fas tries to keep some parity between the Android and iOS applications so I'm not sure how that would work, but I'd be interested to hear if you're open to adding this as a feature (even if just optionally similarly to how Authy has it implemented).

snairolf commented 3 months ago

I see similar behavior with "pin" enabled (i.e. no FaceID). +1 to always asking for extra authentication.