Skip to content

fix(claim): the X token body in the profile's order, by the form serializer - #42

Merged
xgreenx merged 1 commit into
feat/ceremony-rebuild-planfrom
fix/x-token-body-on-ceremony-rebuild
Sep 20, 2026
Merged

xgreenx merged 1 commit into
feat/ceremony-rebuild-planfrom
fix/x-token-body-on-ceremony-rebuild

Conversation

@xgreenx

@xgreenx xgreenx commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Stacked on #28. libid-contracts#47 holds every token body to its profile's field list on chain. X's is grant_type, client_id, code, redirect_uri, code_verifier: the specification's table, the Rust provers, both fixtures and @libid/ceremony on this branch already emit it. The legacy @libid/claim X worker, still used by ts/apps/demo, was the one composer that did not.

Changes

  • ts/packages/claim/src/x/prover.worker.ts: the five fields in profile order, serialized by URLSearchParams instead of encodeURIComponent, which is a URI encoder and spells a space and !~'() differently from the form serializer the verifier checks against.

Verified

  • On this branch: @libid/claim typecheck and vitest, workspace biome lint and biome format: clean.

Not verified / known issues

🤖 Generated with Claude Code

…alizer

libid-contracts holds every token body to its profile's field list, and
X's is grant_type, client_id, code, redirect_uri, code_verifier -- the
order the specification's table, the Rust provers and @libid/ceremony
already use. This builder put client_id last and wrote the body with
encodeURIComponent, which is not the form serializer the verifier
expects.

Assisted-by: Claude Fable 5.1
Signed-off-by: xgreenx <xgreenx9999@gmail.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
libid e518781 Sep 20 2026, 08:46 AM

@xgreenx
xgreenx marked this pull request as ready for review September 20, 2026 08:50
@xgreenx
xgreenx merged commit f99aa38 into feat/ceremony-rebuild-plan Sep 20, 2026
6 of 8 checks passed
@Wondertan
Wondertan deleted the fix/x-token-body-on-ceremony-rebuild branch September 21, 2026 09:10
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.

1 participant