-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Device registration] Leftover bytes detected while parsing authenticator data #440
Comments
Can you try to manually provide a list of algorithms and only keep {
supportedAlgorithmIDs: [-7, -257],
} We also noticed a similar behavior (invalid length of the auth data response in firefox) but only when the algorithm identified by |
I have the same "Leftover bytes detected" issue and as far as I understand, it seems to be related to bad publicKey cbor, the cbor start with Here's my actual data {
"id": "ctOho_p88y9ENn34R1hf8IUMe9YsM4q0W-H9pv23mYL5bCDvwLtu2TR-jB53aQ5nsiW0haCY9vRv3j8qhazQF3oE1rtcdWb7iYgd_kjqerw2H3rK-GpZZq3vVXkw-lwEXGNvUM-TjlCKgbhFE06ymI3Drwq2-Yz8YVUyaEtKY2M",
"rawId": "ctOho_p88y9ENn34R1hf8IUMe9YsM4q0W-H9pv23mYL5bCDvwLtu2TR-jB53aQ5nsiW0haCY9vRv3j8qhazQF3oE1rtcdWb7iYgd_kjqerw2H3rK-GpZZq3vVXkw-lwEXGNvUM-TjlCKgbhFE06ymI3Drwq2-Yz8YVUyaEtKY2M",
"response": {
"attestationObject": "o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVkBBrQEmbAnGmiVcmfeTsQAVqdMh1jGWC4eAfzzV9cxAee6RQAAAAQAAAAAAAAAAAAAAAAAAAAAAIBy06Gj-nzzL0Q2ffhHWF_whQx71iwzirRb4f2m_beZgvlsIO_Au27ZNH6MHndpDmeyJbSFoJj29G_ePyqFrNAXegTWu1x1ZvuJiB3-SOp6vDYfesr4allmre9VeTD6XARcY29Qz5OOUIqBuEUTTrKYjcOvCrb5jPxhVTJoS0pjY6MBY09LUAMnIGdFZDI1NTE5IZggGNUYWBhzGOYYiRjrGKsYfhj9GP0YXRhLCBhLGHMY6BjhGPgYxxUY_xj1GDoY_RijGGsYXxEJGD4YOxQ",
"clientDataJSON": "eyJjaGFsbGVuZ2UiOiJXd0hTZ2pibFJRbXZnZmowUV9EZ3p2a0NBRlFYRzVEVGszcE9SZEZ2cUVFIiwib3JpZ2luIjoiaHR0cHM6Ly9lZHdpbi5jbGllbnRzLmJldGEua2VlZXgubWUiLCJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0"
},
"type": "public-key",
"clientExtensionResults": {}
} Here's the decoded public key I got with original data
If I change the byte to
Which seems better. Though I'm not sure as to why kty and crv are strings instead of respectively 1 and 6. |
Ah, it seems this issue I resolved over in the py_webauthn project has finally found its way to SimpleWebAuthn: There's a follow-up issue that tracks this down to an issue with Firefox: Are you using Firefox 117 by chance? |
Thank you for the reply. |
This is fixed in the newly published @simplewebauthn/server@8.2.0 ✌️ |
After updating both packages to their latest version, registration fails but with a different error this time. Chrome keeps working. Here some debugging info: Working with Chrome:
Failing with Firefox
The verification key is the result of the method verifyRegistrationResponse |
@AntonyChiossi This is a separate issue, please create a new issue. I did some digging and it doesn't seem related to Firefox because that's a |
Describe the issue
When using Firefox (version 117), I encounter the error message "Leftover bytes detected while parsing authenticator data," but this issue is not replicated in Chrome—where the functionality works as expected. I am seeking assistance in understanding the cause of this discrepancy and finding a solution to ensure consistent behavior across browsers.
Reproduction Steps
Expected behavior
Be able to register a Fido2 device
Code Samples + WebAuthn Options and Responses
Dependencies
Both browser and server packages are at latest versions.
SimpleWebAuthn Libraries
├── @simplewebauthn/browser@8.0.2
├── @simplewebauthn/typescript-types@4.0.0
@simplewebauthn/server@8.1.1 overridden
Additional context
I tried commenting out this code:
And the next error encountered was:
The text was updated successfully, but these errors were encountered: