fido2
FIDO2/WebAuthn library for implementing clients and servers.
What it is and what it does
fido2 is a Python library for implementing FIDO2 and WebAuthn authentication flows. It provides low-level device communication with USB authenticators via the CTAP 1 and 2 protocols, as well as higher-level client and server classes for building passwordless authentication systems. The library handles cryptographic verification of attestation and assertion signatures, making it suitable for both authenticator clients and relying party (server) implementations.
The package depends only on cryptography and is actively maintained by Yubico. It supports Windows, macOS, and Linux, though platform-specific setup is required—particularly on Linux where Udev rules must be configured for HID device access. Optional NFC support is available via the pyscard library when installed with the [pcsc] extra.
Use it for:
- Build a WebAuthn-compliant authentication server that accepts FIDO2 devices like YubiKeys for passwordless login.
- Implement a desktop or CLI application that communicates directly with USB authenticators for cryptographic operations.
- Verify FIDO2 attestation signatures to ensure authenticators are genuine during registration flows.
- Add second-factor authentication support to an existing application using standard FIDO2 devices.
- Develop cross-platform security tools that interact with hardware security keys.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements FIDO2 and WebAuthn protocols for communicating with USB authenticators and verifying cryptographic signatures for passwordless authentication.
Yes. Active maintenance, low install friction, no known vulnerabilities, and production-stable status make this suitable for production use. The multi-license composition requires license review, but is clearly disclosed. Install if you need FIDO2/WebAuthn support; the platform-specific setup (especially Linux Udev rules) is a one-time operational concern, not a blocker.
Install
fido2 on PyPI
pip
pip install fido2uv
uv add fido2poetry
poetry add fido2Installing fido2
Before you install
Low install friction with a single runtime dependency (cryptography). Active maintenance with a recent release 46 days ago and ongoing repository activity. Requires Python 3.10 or later.
License in practice
Multi-licensed: primarily BSD 2-clause, with Apache 2.0 code in fido2/hid/ and Mozilla Public License 2.0 for bundled public suffix list. Verify compatibility with your project's license policy before use.
Quickstart
pip install fido2
from fido2.client import ClientData
from fido2.server import Fido2Server
server = Fido2Server(rp_id='example.com')
Requires Python 3.10 or later. On Windows 10+, USB device access requires Administrator privileges or use of WindowsClient. On Linux, requires Udev rules or root access for HID device communication.
Verify before relying
- Whether the library supports the latest FIDO2 specification versions beyond what the description states.
- Performance characteristics when handling multiple concurrent authenticator connections.
- Specific error handling and recovery behavior for device disconnection or communication failures.
Package facts
| License | Copyright (c) 2018 Yubico AB All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *… (full text in the JSON record) (unclear) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — cryptography |
| Maintenance | actively maintained — 46 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,589,350/month — #2,981 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fido2-2.2.1-py3-none-any.whl
Keywords: fido2, webauthn, ctap, u2f
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pyu2fpyu2f provides U2F (Universal 2nd Factor)…
permissive · top 15,000 on PyPI
soft-webauthnEmulates a WebAuthn authenticator in Python for…
permissive · top 15,000 on PyPI
webauthnImplements server-side WebAuthn validation for…
permissive · top 5,000 on PyPI
yubico-clientVerifies Yubico One Time Passwords (OTPs) using…
permissive · top 15,000 on PyPI
django-otp-webauthnAdds WebAuthn Passkey support to Django OTP,…
permissive · top 15,000 on PyPI
PyOTPPyOTP generates and verifies one-time passwords…
permissive · top 1,000 on PyPI
hidapiProvides a Python interface to HIDAPI, enabling…
unclear · top 5,000 on PyPI
oauthenticatorOAuthenticator provides OAuth2 login handlers…
permissive · top 15,000 on PyPI
stytchA Python client library for integrating…
permissive · top 5,000 on PyPI
hidProvides Python bindings to the hidapi library…
permissive · top 15,000 on PyPI