Yubico / yubioath-flutter

Yubico Authenticator for Desktop (Windows, macOS and Linux) and Android
https://developers.yubico.com/yubioath-flutter/
Apache License 2.0
1.03k stars 139 forks source link

Catch exceptions during initial NFC connections #1688

Closed AdamVe closed 2 months ago

AdamVe commented 2 months ago

Every NFC scan begins with getting device info and SCP keys. If any of these operations fails, we cannot continue any (possibly pending) action.

For better user experience, if the failure is an IOException (such as TagLost), the current information of the OATH/FIDO sessions will be preserved so that the action can be retried.

The failure also causes following:

In flutter we have to handle Cancellations by ignoring it, to avoid popping of the navigator stack - this PR adds fixes to places where this was missing.