Skip to content

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

Closed
xgreenx wants to merge 1 commit into
mainfrom
fix/x-token-body-in-profile-order
Closed

xgreenx wants to merge 1 commit into
mainfrom
fix/x-token-body-in-profile-order

Conversation

@xgreenx

@xgreenx xgreenx commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

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 #28 already emit it. The legacy @libid/claim X worker 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

  • @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

cloudflare-workers-and-pages Bot commented Sep 20, 2026

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 Preview URL Updated (UTC)
✅ Deployment successful!
View logs
libid 4d1380e Commit Preview URL

Branch Preview URL
Sep 20 2026, 08:43 AM

@xgreenx

xgreenx commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #42, the same change stacked on #28 where the code lives.

@xgreenx xgreenx closed this Sep 20, 2026
@xgreenx
xgreenx deleted the fix/x-token-body-in-profile-order branch September 20, 2026 08:47
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