Skip to content

Instantly share code, notes, and snippets.

@dzmitry-savitski
Last active August 13, 2025 21:30
Show Gist options
  • Select an option

  • Save dzmitry-savitski/b6dabcc3defd54cdde55a3dd7876c466 to your computer and use it in GitHub Desktop.

Select an option

Save dzmitry-savitski/b6dabcc3defd54cdde55a3dd7876c466 to your computer and use it in GitHub Desktop.
# pip install fido2
import os
from fido2.client.windows import WindowsClient
from fido2.webauthn import PublicKeyCredentialRequestOptions
origin = "https://webauthn.io"
client = WindowsClient(origin) # wraps webauthn.dll on Windows
# Build proper WebAuthn request options
options = PublicKeyCredentialRequestOptions(
challenge=os.urandom(32),
rp_id="webauthn.io",
timeout=60000,
user_verification="discouraged", # we're just probing the transport
)
try:
result = client.get_assertion(options)
print("OK, transport works. Got", len(result.get_response(0).signature), "bytes of signature")
except Exception as e:
print("GetAssertion failed:", repr(e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment