nullpo-head / WSL-Hello-sudo

Let's sudo by face recognition of Windows Hello on Windows Subsystem for Linux (WSL). It runs on both WSL 1 and WSL 2. This is a PAM module for Linux on WSL.
MIT License
1.22k stars 46 forks source link

Error: Key creation failed due to some error #24

Open MichaelJiang1997 opened 3 years ago

MichaelJiang1997 commented 3 years ago

hi, when I run install.sh in my WSL, it says "Error: Key creation failed due to some error". I check the WindowsHelloKeyCredentialCreator source code and find you call KeyCredentialManager.RequestCreateAsync() without any precheck if the user didn't set up PIN. here are the example from https://docs.microsoft.com/en-us/windows/uwp/security/microsoft-passport

var keyCredentialAvailable = await KeyCredentialManager.IsSupportedAsync();
if (!keyCredentialAvailable)
{
    // User didn't set up PIN yet
    return;
}