How to Integrating Windows WebAuthn API with Custom Credential Provider in WPF C#

Harshit Patidar 0 Reputation points
2024-05-20T12:24:14.5966667+00:00

I've developed a Custom Credential Providers application that interacts with the Windows WebAuthn API's WebAuthNAuthenticatorGetAssertion() method for Authentication using Window Hello or External Fido2 Security Key. However, the CredentialUIBroker.exe UI fails to appear on the login page for authentication with an external FIDO2 security key or Windows Hello.

I've also created a sample WPF application to test this approach using Windows WebAuthn.dll, and it functions properly, displaying the CredentialUIBroker.exe for external security key and Windows Hello authentication, but not on the locked screen.

Register an external FIDO security key or Windows Hello from a web browser using the WebAuthn API (https://www.w3.org/TR/webauthn-2/), I utilize the navigate.credential.create() method to register users and save passkeys. Subsequently, I aim to authenticate users with my custom credential provider, written in WPF C#. However, I encounter an issue with the CredentialUIBroker.exe opening at locked screen.

I'm unable to prompt the user authenticator with the external security key and Windows Hello. Could you suggest an approach or solution to open CredentialUIBroker.exe for user authentication on the locked screen with my custom credential provider?

If it's not feasible to open the CredentialUIBroker.exe on the locked screen or if the credential provider cannot utilize Windows WebAuthn.dll, is it possible to create a custom UI in WPF C# to authenticate users with functionalities similar to WebAuthn, such as external security key and Windows Hello authentication using PublicKeyCredentialOptions? I aim to obtain responses like AuthenticatorAssertionRawResponse (including Signature, Authenticator, Userhandle, and ClientJSON) after successful authentication.

Please suggest an approach or solution that mimics WebAuthn's user authentication within a custom credential provider.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,884 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,482 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,690 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,417 questions
{count} votes