Skip to content

Support multiple NFC-devices and backends #154

@msirringhaus

Description

@msirringhaus

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:

  1. 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.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions