Last active
August 13, 2025 21:30
-
-
Save dzmitry-savitski/b6dabcc3defd54cdde55a3dd7876c466 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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