Webauthn.io in Linux OS asks for usb based registration and authentication.It does not support yubikey over NFC due to some issue.
I tried using my yubikey over omnikey reader for testing on Webauthn.io from chrome browser on Linux OS but it only asks for usb based registration but I want to do it over nfc. Is there any solution ?
Disclaimer: I don't have a card reader lying around, so I couldn't test this.
There can be multiple reasons why your Linux system is having an issue with webauthn. The first might be support of whether your webauthn over PCSC. PCSC stands for Personal Computer/Smart Card. It is a specification for smart-card integration into computing environments. Linux systems use pcsclite implementation of PCSC, which I assume you have already installed.
Now the Yubikey needs to be able to communicate over PCSC for Webauthn. This is governed by libfido2. You can install it or can build it from source. I would personally recommend building the latest version from source.
You need to install the following dependencies for the same from apt:
Then you need to clone the libfido2 repository, build it and install it
Now you can restart your system to get the latest version of libfido2 working.
Now the second problem arises. Your system can now communicate with the Yubikey over PCSC on NFC. But your browser still does not support the same for NFC.
This is an issue with all major browsers like Chrome, Chromium, Firefox.(See here Stackoverflow)
There are usually two workarounds:
I came across a fork from the chromium browser called ungoogled-chromium which can allow the use of PCSC. Ungoogled Chromium Github. You can install this from flatpak. First uninstall your current chromium (if you have it installed) and then run.
Now you can enable PCSC on it by
Now you can try testing your YubiKey.
Now, the second approach is to bridge your YubiKey to be read as a USB device. This repo gives a promising approach. I personally dont use poetry to install packagages, so I would use pip3 only.
Now clone the repository and run it
Now you can again test with the browser. Hope this works.