-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Description
With #152 we'll get NFC support, but this PR has currently the restriction to return only the first device that was found.
There are two reasons for this:
- Making a device blink and wait for user-interaction is not possible with NFC, so we can't run the same flow we do for USB, when multiple devices are found. There needs to be a new flow established to select multiple found devices.
- We currently support two backends for NFC detection: pcsc and libnfc. libnfc CAN be compiled with pcsc-support, but doesn't have to be. If it is compiled with pcsc-support, we will find each pcsc-discoverable device twice, if libwebauthn was compiled with support for both backends. Since we can't know if libnfc is compiled with pcsc-support or not, it would be advisable to always use both backends to maximize
chances of finding a device (this can also change underneath us, if system-libs are updated and libnfc adds/removes pcsc-support) . If we want to return more than one NFC-device in the future, we would need to look into de-duplicating devices found by both pcsc and libnfc.
These two problems would need to be solved, if we ever want to return more than one NFC-device.
For now, we stick with returning only one device, thus avoiding both problems.