Skip to content

Conversation

@MasterKale
Copy link

@MasterKale MasterKale commented Jan 17, 2026

This PR adds a WebAuthn response decoder that is capable of parsing both registration and authentication responses into a more human-readable representation.

(I ported over https://debugger.simplewebauthn.dev to here and made it VanillaJS)

I vendored some deps to try and reduce this project's reliance on sites like unpkg.com. I used importmaps for the deps that would support it, but for the ones that don't have ESM builds available I want to try and find more modern libraries that will support this.

TODO

  • Add query param state support
  • Figure out X5C parsing
  • Format code
  • Review dependencies for more modern equivalents
  • Maybe squash some helpers into fewer files
  • Remove extraneous themes from json-viewer (pick a theme from https://pfau-software.de/json-viewer/demo/ first)

Screenshots

Initial State

Screenshot 2026-01-17 at 12 00 29 AM

Registration

Screenshot 2026-01-16 at 11 47 04 PM Screenshot 2026-01-16 at 11 47 21 PM Screenshot 2026-01-16 at 11 47 29 PM

Authentication

Screenshot 2026-01-16 at 11 46 50 PM Screenshot 2026-01-16 at 11 46 53 PM

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 17, 2026

Deploying tools-passkeys-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: 14c1c97
Status: ✅  Deploy successful!
Preview URL: https://38bad63e.tools-passkeys-dev.pages.dev
Branch Preview URL: https://mm-feat-decode-response.tools-passkeys-dev.pages.dev

View logs

Comment on lines +40 to +64
// DEBUG - Registration
setTimeout(() => {
flask.updateCode(`{
"id": "0PjLmk8beadc6I1u5bMrZv6rg0JlTfkp",
"rawId": "0PjLmk8beadc6I1u5bMrZv6rg0JlTfkp",
"response": {
"attestationObject": "o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVicdKbqkhPJnC90siSSsyDPQCYqlMGpUKA5fyklC2CEHvBdAAAAALraVWanqkAfvZZFYZpVEg0AGND4y5pPG3mnXOiNbuWzK2b-q4NCZU35KaUBAgMmIAEhWCBqFugix1y1gg-sUzr8JhsvI-b8Dc5lAUSqlLL4vKTcziJYIE-InBmgUVIpTbCN2D_h5UYzWhA7wJlP0a5CAYdSkb4Q",
"clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiMVVlLWZCZXkyR3p3QXQteU9LRWROUUloYXV1Vmw1QkRFcy1lLWZqUEdfTlBmU2ZIT0YwQUJ0LWQ1SG1UaWJhSV82SkZ1cHQ1bmp3dmNxWTVNSmpNdGciLCJvcmlnaW4iOiJodHRwczovL3dlYmF1dGhuLmlvIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ",
"transports": [
"internal",
"hybrid"
],
"publicKeyAlgorithm": -7,
"publicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEahboIsdctYIPrFM6_CYbLyPm_A3OZQFEqpSy-Lyk3M5PiJwZoFFSKU2wjdg_4eVGM1oQO8CZT9GuQgGHUpG-EA",
"authenticatorData": "dKbqkhPJnC90siSSsyDPQCYqlMGpUKA5fyklC2CEHvBdAAAAALraVWanqkAfvZZFYZpVEg0AGND4y5pPG3mnXOiNbuWzK2b-q4NCZU35KaUBAgMmIAEhWCBqFugix1y1gg-sUzr8JhsvI-b8Dc5lAUSqlLL4vKTcziJYIE-InBmgUVIpTbCN2D_h5UYzWhA7wJlP0a5CAYdSkb4Q"
},
"type": "public-key",
"clientExtensionResults": {
"credProps": {
"rk": true
}
},
"authenticatorAttachment": "platform"
}`);
}, 10);
Copy link
Author

Choose a reason for hiding this comment

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

Oops, I need to remove this.

}

/**
*
Copy link
Author

Choose a reason for hiding this comment

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

Add a docstring here.

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.

2 participants