Skip to content

Comments

Use libwebauthn for JSON request parsing#116

Open
AlfioEmanueleFresta wants to merge 3 commits intomainfrom
libwebauthn-json
Open

Use libwebauthn for JSON request parsing#116
AlfioEmanueleFresta wants to merge 3 commits intomainfrom
libwebauthn-json

Conversation

@AlfioEmanueleFresta
Copy link
Member

@AlfioEmanueleFresta AlfioEmanueleFresta commented Dec 26, 2025

This PR migrates JSON request parsing to use libwebauthn's WebAuthnIDL::from_json() trait instead of our custom parsing code. This removes ~700 lines of manual parsing in favour of the shared implementation.

Changes

  • Use MakeCredentialRequest::from_json() and GetAssertionRequest::from_json() from libwebauthn
  • Remove intermediate parsing structs (MakeCredentialOptions, GetCredentialOptions, CredentialDescriptor, etc.)
  • Pin libwebauthn to commit d97c80d25bdb974472c40de5e5031db5946ad532 (from Web IDL support 3/N: response JSON serialization libwebauthn#155)

Behavioral changes

Default timeout

The default timeout when not specified by the relying party changes from 300s to 60s:

Allow list transports

Previously we cleared transports from credentials in the allow list as a workaround. This is no longer done - transports now pass through as-is. These are just UI hints and shouldn't affect functionality.

Follow-up

Copy link
Collaborator

@msirringhaus msirringhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some questions inline

@iinuwa
Copy link
Member

iinuwa commented Feb 19, 2026

The default timeout when not specified by the relying party changes from 300s to 60s:

Haven't looked again at this full PR, but I'd like to preserve the 300 second timeout since that's the minimum timeout recommended by the spec for accessibility reasons.

I created linux-credentials/libwebauthn#172 to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants