skillfed

webauthn

Pythonic WebAuthn

webauthn v3.0.0 7.0M downloads/30d#1,801 on PyPI1,056
Permissive license BSD-3-Clause Active released

What it is and what it does

py_webauthn is a server-side implementation of the WebAuthn specification that handles the cryptographic validation of passwordless authentication credentials. It works with any FIDO2-compliant authenticator—security keys, Touch ID, Face ID, Windows Hello, Android biometrics—and exposes four core methods: generate_registration_options, verify_registration_response, generate_authentication_options, and verify_authentication_response. The library assumes JSON transport between server and browser, with base64url encoding for binary data to avoid extra dependencies.

The package depends on pyasn1, pyasn1-modules, cbor2, cryptography, and pyOpenSSL to handle the underlying cryptographic operations and ASN.1 parsing required by the WebAuthn spec. It provides helper dataclasses for type-safe construction of inputs and outputs, and utility functions for JSON serialization and base64url conversion. Developers integrate it by generating challenge-based options on the server, sending them to the browser's WebAuthn API, then validating the returned credential against the server-stored challenge.

Use it for:

  • Add passwordless login to a web application using hardware security keys or platform biometrics.
  • Implement multi-factor authentication where WebAuthn serves as a second factor alongside passwords.
  • Build a registration flow that enrolls users' authenticators and stores their public keys server-side.
  • Verify authentication responses from browser-based WebAuthn ceremonies without managing passwords.
  • Support cross-platform authentication across desktop, mobile, and web clients with a single server implementation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements server-side WebAuthn validation for passwordless authentication using FIDO2-compliant authenticators like security keys, biometrics, and platform authenticators.

Yes. This is a production-stable, actively maintained library with no known vulnerabilities, low install friction, and a permissive license. Install it if you need to add WebAuthn support to a Python backend and are targeting Python 3.10+. The API is straightforward and the dependency footprint is small and well-established.

Install

webauthn on PyPI

pip

pip install webauthn

uv

uv add webauthn

poetry

poetry add webauthn

Installing webauthn

Before you install

Low install friction with a pure-Python wheel and five stable runtime dependencies. Active maintenance with a recent release and no known vulnerabilities.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions.

Quickstart

pip install webauthn

from webauthn import generate_registration_options, verify_registration_response

options = generate_registration_options(rp_id="example.com", rp_name="Example")
# Send options to client, receive response, then:
verified = verify_registration_response(credential=response, expected_challenge=challenge)

Requires Python 3.10 or later.

Verify before relying

  • Whether the library's type hints and dataclass helpers fully cover all WebAuthn spec edge cases in production deployments.
  • Performance characteristics when handling high-volume concurrent registration and authentication flows.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — pyasn1, pyasn1-modules, cbor2, cryptography, pyOpenSSL
Maintenance actively maintained — 46 days since the last release
Last repo commit
First released
Downloads 6,984,854/month — #1,801 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: webauthn-3.0.0-py3-none-any.whl

Keywords: webauthn, fido2

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3

Tags

webauthn server implementationfido2 authenticationpasswordless loginsecurity key verificationbiometric authentication server
authenticationcryptographyfido2

More Cryptography packages