{"id":15931175,"url":"https://github.com/michaelgrafnetter/webauthn-interop","last_synced_at":"2026-06-05T01:01:18.223Z","repository":{"id":252691991,"uuid":"295007487","full_name":"MichaelGrafnetter/webauthn-interop","owner":"MichaelGrafnetter","description":"Passkeys/FIDO2/WebAuthn .NET Library for Windows Desktop and CLI Applications","archived":false,"fork":false,"pushed_at":"2025-01-19T11:17:24.000Z","size":2069,"stargazers_count":25,"open_issues_count":7,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T13:56:56.089Z","etag":null,"topics":["authenticator","dotnet","dotnet-core","fido2","interop","nuget-package","passkeys","security","webauthn","winapi","windows-hello"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichaelGrafnetter.png","metadata":{"files":{"readme":".github/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-12T18:57:22.000Z","updated_at":"2025-03-19T05:27:15.000Z","dependencies_parsed_at":"2024-08-11T20:49:01.701Z","dependency_job_id":"5742f525-d6a4-4840-a53d-3b0558a4573b","html_url":"https://github.com/MichaelGrafnetter/webauthn-interop","commit_stats":{"total_commits":63,"total_committers":3,"mean_commits":21.0,"dds":0.4285714285714286,"last_synced_commit":"c692354cb81178c5f47e55251ce57301facd8822"},"previous_names":["michaelgrafnetter/webauthn-interop"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MichaelGrafnetter/webauthn-interop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelGrafnetter%2Fwebauthn-interop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelGrafnetter%2Fwebauthn-interop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelGrafnetter%2Fwebauthn-interop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelGrafnetter%2Fwebauthn-interop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichaelGrafnetter","download_url":"https://codeload.github.com/MichaelGrafnetter/webauthn-interop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelGrafnetter%2Fwebauthn-interop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260015901,"owners_count":22946319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authenticator","dotnet","dotnet-core","fido2","interop","nuget-package","passkeys","security","webauthn","winapi","windows-hello"],"created_at":"2024-10-07T01:04:18.639Z","updated_at":"2026-06-05T01:01:18.188Z","avatar_url":"https://github.com/MichaelGrafnetter.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebAuthn Interop Assembly Project\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](../LICENSE)\n[![Windows 10 1903+](https://img.shields.io/badge/Windows%2010-1903%2B-007bb8.svg?logo=Windows)](#)\n[![.NET Framework 4.8+](https://img.shields.io/badge/.NET%20Framework-4.8%2B-007FFF.svg)](#)\n[![.NET Core 3+](https://img.shields.io/badge/.NET%20Core-3%2B-007FFF.svg)](#)\n[![Continuous Integration Status](https://github.com/MichaelGrafnetter/webauthn-interop/actions/workflows/autobuild.yml/badge.svg)](https://github.com/MichaelGrafnetter/webauthn-interop/actions)\n\n**Passkeys / FIDO2 / W3C Web Authentication .NET Library for Windows Desktop and CLI Applications**\n\n## Interop Assembly\n\nThe `DSInternals.Win32.WebAuthn` library allows .NET applications to directly interact with Passkeys (e.g. [Windows Hello](https://support.microsoft.com/en-us/windows/passkeys-in-windows-301c8944-5ea2-452b-9886-97e4d2ef4422), [Microsoft Authenticator](https://learn.microsoft.com/en-us/entra/identity/authentication/how-to-register-passkey-authenticator), [YubiKey](https://www.yubico.com/products/), [Feitian](https://www.ftsafe.com/products/FIDO), or [Crayonic](https://www.crayonic.com/)) on Windows.\nIt provides a managed wrapper of the low-level [Windows 10+ WebAuthn API](https://learn.microsoft.com/en-us/windows/win32/api/_webauthn/)\n(defined in the [`webauthn.h`](https://github.com/microsoft/webauthn/blob/master/webauthn.h) header file and implemented in the `webauthn.dll` system library). This API is mainly used by browsers\n(see the source code of [Chromium](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/device/fido/win/webauthn_api.cc)\nand [Firefox](https://searchfox.org/mozilla-central/source/dom/webauthn/WinWebAuthnService.cpp)) to implement passwordless web authentication,\nbut it can also be used by any .NET desktop or CLI application.\n\nThe `DSInternals.Win32.WebAuthn.Adapter` library additionally uses classes defined in the [Fido2.Models](https://www.nuget.org/packages/Fido2.Models/) package as its front-end, which it then translates to native C structures. See the [project site](https://github.com/abergs/fido2-net-lib) for more details.\n\n## PowerShell Module\n\nThe [DSInternals.Passkeys](https://www.powershellgallery.com/packages/DSInternals.Passkeys) PowerShell module uses the `DSInternals.Win32.WebAuthn` library together with the [Microsoft Graph API](https://learn.microsoft.com/en-us/graph/api/resources/fido2authenticationmethod?view=graph-rest-beta) and the [Okta API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UserFactor/#tag/UserFactor/operation/enrollFactor) to provide Microsoft Entra ID and Okta administrators respectively the capability of registering passkeys on behalf of other users:\n\n![PowerShell Passkey Registration Screenshot](../Documentation/Screenshots/powershell-entra.png)\n\nSee [Yubico's blog](https://www.yubico.com/blog/microsoft-strengthens-phishing-resistant-security-for-entra-id-with-fido2-provisioning-apis/) for more details on the API.\n\n## Passkey UI\n\nThe project also contains a simple Windows GUI tool called `Passkey UI`, which is built on top of the `DSInternals.Win32.WebAuthn` library:\n\n![Passkey UI Assertion Screenshot](../Documentation/Screenshots/passkey-ui.png)\n\n![Passkey UI Authenticators Screenshot](../Documentation/Screenshots/passkey-ui-authenticators.png)\n\n![Passkey UI Windows Hello Passkeys Screenshot](../Documentation/Screenshots/passkey-ui-winhello.png)\n\n![Passkey UI Software Signer Screenshot](../Documentation/Screenshots/passkey-ui-signer.png)\n\n![Passkey UI WebAuthn API Version Screenshot](../Documentation/Screenshots/passkey-ui-api-version.png)\n\n![Passkey UI WebAuthn Events Screenshot](../Documentation/Screenshots/passkey-ui-events.png)\n\nThe only purpose of this tool is to demonstrate the usage of the WebAuthn API.\n\n## Downloads\n\n[![GitHub Downloads](https://img.shields.io/github/downloads/MichaelGrafnetter/webauthn-interop/total.svg?label=GitHub%20Downloads\u0026logo=GitHub)](https://github.com/MichaelGrafnetter/webauthn-interop/releases)\n[![PowerShell Gallery Downloads](https://img.shields.io/powershellgallery/dt/DSInternals.Passkeys.svg?label=PowerShell%20Gallery%20Downloads\u0026logo=PowerShell)](https://www.powershellgallery.com/packages/DSInternals.Passkeys/)\n[![NuGet Gallery Downloads](https://img.shields.io/nuget/dt/DSInternals.Win32.WebAuthn.svg?label=NuGet%20Gallery%20Downloads\u0026logo=NuGet)](https://www.nuget.org/packages/DSInternals.Win32.WebAuthn/)\n\n- The `DSInternals.Passkeys` PowerShell module is published in the [PowerShell Gallery](https://www.powershellgallery.com/packages/DSInternals.Passkeys).\n- The latest version of the `Passkey UI` can be downloaded from the [Releases section](https://github.com/MichaelGrafnetter/webauthn-interop/releases/latest).\n- The `DSInternals.Win32.WebAuthn` library is published in the [NuGet Gallery](https://www.nuget.org/packages/DSInternals.Win32.WebAuthn/).\n\n## .NET API Usage\n\n### Overview\n\nThe WebAuthn API is only supported on Windows 10 1903 and newer. It is exposed in the [DSInternals.Win32.WebAuthn](../Documentation/API/DSInternals.Win32.WebAuthn.md) namespace, with the [WebAuthnApi](../Documentation/API/DSInternals.Win32.WebAuthn.WebAuthnApi.md) class being the main entry point.\n\nFollowing are code samples that mimic the behavior of [login.microsoftonline.com](https://login.microsoftonline.com).\nThe samples are not ready for production use, as they are missing validation and contain many hardcoded values. Especially the `challenge` must be randomly generated in a cryptographically safe way.\n\n### Passkey Registration (Attestation)\n\nCredential registration is performed by calling the [AuthenticatorMakeCredential](../Documentation/API/DSInternals.Win32.WebAuthn.WebAuthnApi.md) or [AuthenticatorMakeCredentialAsync](../Documentation/API/DSInternals.Win32.WebAuthn.WebAuthnApi.md) method:\n\n```cs\nvar rp = new RelyingPartyInformation()\n{\n    Id = \"login.microsoft.com\",\n    Name = \"Microsoft\"\n};\n\nvar user = new UserInformation()\n{\n    Name = \"john.doe@outlook.com\",\n    DisplayName = \"John Doe\",\n    Id = Base64UrlConverter.FromBase64UrlString(\"TUY65dH-Otl4jMdTRvlFQ1aApACYsuqGKSPQDQc1Bd4WVyw\")\n};\n\nvar challenge = new byte[] { 0, 1, 2, 3 };\nvar api = new WebAuthnApi();\n\nvar response = api.AuthenticatorMakeCredential(rp, user, challenge, UserVerificationRequirement.Required, AuthenticatorAttachment.Any);\n```\n\n### Passkey Authentication (Assertion)\n\nAuthentication using a previously registered credential is performed by calling the [AuthenticatorGetAssertion](../Documentation/API/DSInternals.Win32.WebAuthn.WebAuthnApi.md) or [AuthenticatorGetAssertionAsync](../Documentation/API/DSInternals.Win32.WebAuthn.WebAuthnApi.md) method:\n\n```cs\nvar api = new WebAuthnApi();\nvar challenge = new byte[] { 0, 1, 2, 3 };\nvar response = api.AuthenticatorGetAssertion(\"login.microsoft.com\", challenge, UserVerificationRequirement.Required, AuthenticatorAttachment.CrossPlatform);\n```\n\n## Troubleshooting\n\n### Rohitab API Monitor\n\nRohitab API Monitor can be used to [analyze WebAuthn API calls made by browsers](../Documentation/Rohitab/README.md):\n\n![API Monitor Screenshot](../Documentation/Screenshots/api-monitor.png)\n\n### Windows Event Viewer\n\nWindows 10 creates very detailed logs of WebAuthn API calls and CTAP commands. The logs can be displayed in the built-in\n**Event Viewer** console under **Applications and Services Logs \u0026rarr; Microsoft \u0026rarr; Windows \u0026rarr; WebAuthN \u0026rarr; Operational**:\n\n![WebAuthn Event Viewer Screenshot](../Documentation/Screenshots/webauthn-event-viewer.png)\n\n## Microsoft's Documentation\n\n- [WebAuthn APIs for password-less authentication on Windows 10](https://learn.microsoft.com/en-us/windows/win32/api/webauthn/)\n- [C header file](https://github.com/microsoft/webauthn/blob/master/webauthn.h)\n- [Graph API Create fido2AuthenticationMethod](https://learn.microsoft.com/en-us/graph/api/authentication-post-fido2methods?view=graph-rest-beta)\n\n## Acknowledgements\n\n- This project uses the [FIDO2 .NET Library](https://github.com/abergs/fido2-net-lib). Huge thanks to its contributors, mainly @abergs and @aseigler.\n- There are at least 2 similar projects, in various stages of completeness:\n  - [Yoq.Windows.WebAuthn](https://github.com/dbeinder/Yoq.Windows.WebAuthn)\n  - [HelloSample](https://github.com/aseigler/HelloSample)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelgrafnetter%2Fwebauthn-interop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelgrafnetter%2Fwebauthn-interop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelgrafnetter%2Fwebauthn-interop/lists"}