Added shareable config links that maintain selected settings#280
Merged
soamdesai-tfh merged 1 commit intoJun 11, 2026
Merged
Conversation
|
@soamdesai-tfh is attempting to deploy a commit to the Worldcoin Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Takaros999
approved these changes
Jun 9, 2026
| nationality: { enabled: false, value: "" }, | ||
| }; | ||
|
|
||
| type SharedDemoState = { |
Contributor
There was a problem hiding this comment.
nitpick: this file is getting very bloated can we split this logic into a separate file?
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.
Summary
Test Plan
/keeps Configuration open with no modal.?config=...restores state, stays collapsed, and does not auto-open modal.next buildpasses.Note
Low Risk
Changes are confined to the Next.js example UI and client-side URL encoding; no auth, APIs, or production SDK behavior.
Overview
Adds shareable configuration links to the Next.js IDKit demo so teammates can reproduce the same widget scenario without re-tuning every control.
Share config serializes the current UI state (flow mode, environment, credentials, identity attributes, staging overrides, etc.) into a versioned JSON blob, base64url-encodes it, and builds a
?config=…URL. Copy uses the Clipboard API with a textarea fallback; if copy fails, a read-only URL field is shown. Sharing does not change the browser address bar—only the copied link carries the token.Opening a link with a valid
configquery param hydrates all matching React state vianormalizeSharedDemoState(typed coercion, length limits, and the same cross-field rules as the live UI), then collapses the Configuration panel. Invalid or malformed tokens show an error and leave Configuration expanded. A Hide/Show toggle controls panel visibility on normal visits (expanded by default).Styling adds a Configuration header row (title, status, actions), collapsed-panel behavior, share status/error text, and mobile layout tweaks in
globals.css.Reviewed by Cursor Bugbot for commit 55f8fd8. Bugbot is set up for automated code reviews on this repo. Configure here.