Repository navigation
feat(nextjs-example): allow reordering multi-credential requests - #368
Merged
Merged
Conversation
evlaryutina-test
requested review from
Guardiola31337,
Takaros999,
chipp,
kchaw2005,
murph and
paolodamico
as code owners
November 18, 2026 12:25
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Takaros999
approved these changes
Nov 23, 2026
This branch was successfully deployed
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.
The Next.js demo currently forces multiple credentials into a fixed PoH/Selfie/Passport/MNC order, so testers cannot try a different order in
enumerate(orany/all) requests.Add accessible up/down controls for selected credentials. For example, moving Selfie above PoH now produces
enumerate: [selfie, proof_of_human]in both the JSON preview and the widget request. Newly selected credentials are appended, and shared configurations preserve their selected order. Request and session flows use the same order-preserving helper; default selections and credential options are unchanged.Changes are limited to the Next.js example, its README, and regression tests. SDK and API implementations are untouched.
Validation:
Manual review: choose World ID 4.0 → Multiple credentials → Enumerate; use the arrows, confirm preview order, and repeat in Session flow. Share and reopen the configuration to check the saved order.
Note
Low Risk
Changes are confined to the Next.js example app, styling, README, and tests; no SDK or production API behavior is modified.
Overview
The Next.js World ID 4.0 demo no longer pins Multiple credentials to a fixed PoH → Selfie → Passport → MNC order. Credential order ↑/↓ controls let testers reorder the selection; new checkboxes append at the end, and that order flows through the constraints JSON preview, widget requests, session constraints, and shared config links.
normalizeMultiCredentialsandbuildMultiConstraintsinmulti-constraints.tsnow preserve user order (dedupe and filter unknown types only) instead of re-sorting to canonical priority—important foranypriority andenumerateordering. The example README documents the UI and adds apnpm testregression suite (node --test) covering order preservation across combinators, shared-state normalization, and session genesis options.Reviewed by Cursor Bugbot for commit e51004f. Bugbot is set up for automated code reviews on this repo. Configure here.