Yubico / Yubico.NET.SDK

A YubiKey SDK for .NET developers
Apache License 2.0
96 stars 48 forks source link

YubiKeyDevice.FindAll() is empty #8

Closed nikosft closed 2 years ago

nikosft commented 2 years ago

Hi, I have Security Key NFC with firmware 5.2.7. It is recognized by the Yubikey Manager and I can use it in Webauthn demo sites. Nevertheless, I cannot make it work with .net sdk. The following trivial .net 5.0 console application compiles but the FindAll() operation returns an empty set

using System;
using Yubico.YubiKey;

namespace Yubikey
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello Yubikey!");
            var keys = YubiKeyDevice.FindAll(); //keys is empty!
            foreach (var key in keys)
            {
                Console.WriteLine(key);
            }
        }
    }
}

I have installed Yubico.YubiKey v1.1.0 using the Nuget Package Manager, on Visual Studio 2019 in Windows 10.

GregDomzalski commented 2 years ago

Hello,

Unfortunately the .NET SDK does not yet support the FIDO protocols of the YubiKey. We plan to add support in a future release.

Would it still be useful for you if the SDK would at least enumerate these keys, even if you cannot connect to the FIDO application on the key?

nikosft commented 2 years ago

In the YubiKey get started page there is a link to "Developer Resources" and I thought you could do something with the SDK and the YubiKey

GregDomzalski commented 2 years ago

Depending on what you would like to do with your security key, the two best integration points are probably:

Windows WebAuthn library: https://github.com/Microsoft/webauthn

or Yubico's libfido2: https://github.com/yubico/libfido2

There are some unofficial .NET bindings for libfido2 here: https://github.com/borrrden/Fido2Net

Sorry for the confusion this caused. I hope you find one of the above links helpful!