# fido2-net-lib: Passkeys and WebAuthn for .NET

> fido2-net-lib is an MIT-licensed .NET library for validating FIDO2 registrations and authentications, including passkeys, roaming authenticators, platform authenticators, and attestation. It is a better fit than ASP.NET Identity passkey support when a project needs WebAuthn outside Identity or requires attestation.

**passwordless-lib/fido2-net-lib** — Passkeys, FIDO2 and WebAuthn .NET library.

- Repository: https://github.com/passwordless-lib/fido2-net-lib
- Website: https://fido2.andersaberg.com
- Stars: 1,458 · Forks: 201
- Language: C#
- License: MIT
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/passwordless-lib-fido2-net-lib

## What fido2-net-lib Does for .NET Authentication

fido2-net-lib gives .NET developers the server-side pieces needed to use FIDO2 and WebAuthn credentials. Its stated purpose is passwordless sign-in for ASP.NET, .NET Core, and native .NET applications. The library is aimed at developers who need to accept a registration for a passkey or security key and later validate an authentication assertion when the user signs in.

The supported credential types include FIDO2 security keys, also called roaming authenticators, and device-embedded platform authenticators. The README names SoloKeys Solo, Yubico YubiKey, Feitian BioPass FIDO2, Android Key, TPM, Windows Hello, Face ID, and Touch ID for the Web as examples. The library also documents backwards compatibility with FIDO U2F authenticators.

This is not a complete user account system. It handles the FIDO2 relying-party side of WebAuthn, including validation of registration and authentication data. Account records, user identity, credential storage policy, recovery, and the surrounding application session flow remain application responsibilities unless another component supplies them.

The project is also relevant to phishing-resistant authentication because FIDO2 uses public and private keys rather than sending a shared password secret to the relying party. The private key remains with the authenticator, while the application validates data returned by the credential. The README connects this design to passwordless sign-in and strong multi-factor authentication.

## Registration, Attestation, and Assertion Data Flow

The library separates the two main WebAuthn operations. During registration, the application obtains a credential from the authenticator and passes the resulting registration data to the library for validation. The README identifies this operation as registration and attestation. During authentication, the application receives an assertion from the authenticator and validates that assertion for the user.

A typical relying-party implementation therefore has two server boundaries. The first handles creation or enrollment of a passkey. The second handles a sign-in request. The library's supported-feature list explicitly names the Attestation API with registration and credential or authenticator verification, and the Assertion API with authentication verification.

Attestation is an important distinction when comparing this library with the passkey support announced for .NET 10. The README says that .NET 10 passkey support is available as part of ASP.NET Identity. It also says that Microsoft recommends this library, or another third-party library, for advanced features such as attestation, and that a plugin interface can combine this library with the Microsoft implementation.

That architecture makes fido2-net-lib usable in more than one application shape. The README lists standalone use when the application is not tied to ASP.NET Identity, SPA authentication without ASP.NET Identity, and modern passkey features. It does not document a browser-side user interface, account database, or deployment service, so those parts must be supplied by the application or a separate service.

## Installing Fido2 Packages for the Target Application

The documented requirement is.NET 8.0 or later. A.NET application that needs the core library can add the `Fido2` package with the standard `dotnet` package command. The package name and command below are copied from the README.

```bash
dotnet add package Fido2
```

ASP.NET Core applications can add the separate helpers package. This package is not documented as a replacement for the core package, so the README presents it as an additional option.

```bash
dotnet add package Fido2.AspNet
```

For Blazor WebAssembly applications, the documented package is `Fido2.BlazorWebAssembly`.

```bash
dotnet add package Fido2.BlazorWebAssembly
```

After installation, the next step is to use the repository's `Demo/` application as the reference implementation. The repository includes `Demo/DemoController.cs`, `Demo/ConformanceTestController.cs`, `Demo/ConformanceTesting.cs`, and related helper files. The README does not provide a single copy-and-paste endpoint implementation in that text, so a production first-use tutorial cannot be completed from the documented commands alone.

The migration documentation is also part of first-use planning. The README warns that upgrading from v3.x includes breaking changes and points to `Documentation/migration-guide-4.0.0.md`. That file should be consulted before changing an existing registration or assertion implementation.

## fido2-net-lib Compared with ASP.NET Identity Passkeys

The README makes a direct architectural comparison between fido2-net-lib and the passkey support announced in .NET 10. The first choice is the built-in ASP.NET Identity path. It is presented as a sensible option when an application already uses ASP.NET Identity and does not need attestation or newer passkey features.

fido2-net-lib addresses a different constraint. It can be used without ASP.NET Identity, including in a SPA that handles authentication outside the Identity stack. It also targets native .NET applications as part of the project's stated scope. The difference is therefore not simply which library has a passkey button. It is the boundary around the identity system and the credential features available to the application.

Attestation is the clearest documented feature split. The README says the .NET 10 support is limited to ASP.NET Identity, while this library includes an Attestation API and verification. It also describes a plugin interface for combining the libraries. An application that needs only ordinary passkey registration and authentication may prefer the built-in path for integration simplicity. An application that needs attestation, broader framework choice, or newer standard coverage may have a reason to select fido2-net-lib.

The trade-off is implementation responsibility. The standalone library does not remove the need for application-side credential records, user mapping, recovery policy, or WebAuthn ceremony integration. ASP.NET Identity can provide an established application context, whereas fido2-net-lib gives more control over that context at the cost of assembling more pieces in the application.

## Limits, Failure Modes, and Upgrade Costs

The main limitation is scope. fido2-net-lib validates WebAuthn and FIDO2 credentials, but the repository description does not claim to manage accounts, passwords, recovery, sessions, or user enrollment policy. A server that accepts an assertion still needs to decide which user and credential record the assertion belongs to, then establish the application's authenticated session.

The library is also not a complete native or browser passkey user experience. The repository includes a demo and a Blazor WebAssembly package, but the README does not provide a hosted service, ready-made screens, or a universal client implementation. A SPA, native application, or ASP.NET Core application will still need its own browser or platform integration.

Version changes require attention. The README identifies v3.x to v4.x as a breaking upgrade and links to the migration guide. The recent release list includes version 4.3.0 on 2026-10-13, version 5.0.0-preview.7 on 2026-02-02? Wait, supplied release date is 2026-10-02, and the README requirement is.NET 8.0 or later. The last push was on 2026-10-13, and the repository is not archived. These facts indicate recent repository activity, but they do not remove the cost of reading migration notes and checking compatibility for each application.

The MIT license permits use and modification under its terms. That is a repository-level licensing fact, not legal advice. Teams should still account for their own dependencies, hosting obligations, credential storage, privacy requirements, and recovery design.

## Choosing fido2-net-lib for Passkey Projects

fido2-net-lib is suited to .NET teams that need direct control over FIDO2 registration and authentication validation. It is particularly relevant for SPAs, native .NET applications, projects outside ASP.NET Identity, and credential flows that require attestation. The documented package model supports a core library plus ASP.NET Core or Blazor WebAssembly helpers.

It is less suitable when an existing ASP.NET Identity application only needs the passkey scope provided by .NET 10 and has no requirement for attestation or newer passkey behavior. In that case, staying inside Identity may reduce integration work. It is also a poor choice if the team expects a complete account and recovery product rather than a relying-party validation library.

Before adoption, verify four project-specific points: the application meets the documented .NET 8.0 requirement; the browser or platform integration can produce the registration and assertion data the server expects; the application has a defined place to store credential records and map them to users; and the team has reviewed the v3.x migration guide if it is upgrading. The first implementation should use the repository's `Demo/` code as the concrete reference, then test registration and authentication separately with the intended authenticator types.

## Conclusion

Adopt fido2-net-lib when the application needs direct FIDO2 or WebAuthn validation, a SPA integration, native .NET support, or attestation. ASP.NET Identity may be simpler when its built-in passkey scope is sufficient. Before choosing, verify the .NET version, whether the application needs attestation, how credentials will be stored, and how upgrades from v3.x will be handled.

## FAQ

### What is fido2-net-lib used for?

It is a .NET library for validating FIDO2 and WebAuthn registrations and authentications. It supports passkeys, security keys, platform authenticators, and attestation, according to the README.

### Does fido2-net-lib require ASP.NET Identity?

No. The README says the library can be used without ASP.NET Identity, including for SPA and native .NET applications. ASP.NET Core and Blazor WebAssembly packages are available as separate options.

### How do I install fido2-net-lib?

The README requires .NET 8.0 or later and documents installing the `Fido2` package with `dotnet add package Fido2`. ASP.NET Core and Blazor WebAssembly users can add `Fido2.AspNet` or `Fido2.BlazorWebAssembly` instead or as appropriate for the application.

## Sources

- [License: MIT](https://github.com/passwordless-lib/fido2-net-lib/blob/main/LICENSE)
- [passwordless-lib/fido2-net-lib on GitHub](https://github.com/passwordless-lib/fido2-net-lib)
- [Project website](https://fido2.andersaberg.com)
- [README](https://github.com/passwordless-lib/fido2-net-lib/blob/main/README.md)
- [Releases](https://github.com/passwordless-lib/fido2-net-lib/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/passwordless-lib-fido2-net-lib
