Repository navigation
Conversation
jerimin
added a commit
to jerimin/clouddigit-keywind
that referenced
this pull request
Aug 18, 2026
jerimin
added a commit
to jerimin/clouddigit-keywind
that referenced
this pull request
Aug 18, 2026
jerimin
added a commit
to jerimin/clouddigit-keywind
that referenced
this pull request
Aug 18, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
npm run buildfails on a clean install with any TypeScript >= 5.7:TypeScript 5.7 made
Uint8Arraygeneric over its backing buffer (Uint8Array<TArrayBuffer>).base64url.parse()fromrfc4648is typed asUint8Array<ArrayBufferLike>, andArrayBufferLikeincludesSharedArrayBuffer, so it no longer satisfiesBufferSourcein the WebAuthn option types.
Because
package.jsondeclares"typescript": "^5.2.2", a freshnpm installresolves tothe latest 5.x and the build breaks. This affects anyone building the theme today, not just
those who deliberately upgraded.
Fix
Wrap each
base64url.parse(...)result innew Uint8Array(...), which produces an arraybacked by a plain
ArrayBuffer.Chosen over the alternatives deliberately:
as Uint8Array<ArrayBuffer>— the generic parameter doesn't exist before TS 5.7,so a cast would break older toolchains
devDependencies— that just defers the problem and blocksconsumers from upgrading
new Uint8Array(x)type-checks on both old and new TypeScript, needs noany, and theruntime cost is a copy of a challenge/credential-id (tens of bytes, once per ceremony).
5 call sites across the two WebAuthn modules:
webAuthnRegister.ts—challenge,user.id, and theexcludeCredentialsidwebAuthnAuthenticate.ts—challengeand theallowCredentialsidVerification
Built from a clean checkout of this branch in CI with TypeScript 5.9.3 resolved by
npm install(no pin):masterfails the same job; this branch passes. No behavioural change to the WebAuthn flowsthemselves — the values passed to
navigator.credentialsare byte-identical.