feat(examples): invite-code mode in browser, Next.js, and iOS samples (APP-9428)#239
Open
SeanROlszewski wants to merge 1 commit intoapp-9428-corefrom
Open
feat(examples): invite-code mode in browser, Next.js, and iOS samples (APP-9428)#239SeanROlszewski wants to merge 1 commit intoapp-9428-corefrom
SeanROlszewski wants to merge 1 commit intoapp-9428-corefrom
Conversation
|
You must have Developer access to commit code to Worldcoin on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes. Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles |
5 tasks
…APP-9428) Stacks on top of the core API PR. Adds runnable demos of the invite-code flow across the three example apps: - js/examples/browser: vanilla integration of `IDKit.requestWithInviteCode(...)`. Adds a "Use invite code" toggle alongside the QR mode, an editable App ID input (for staging), and a Bridge URL input that flows into `request.bridge_url` (so the example can target a local wallet-bridge during development). Local bridges over `http://localhost:*` require an `app_staging_` App ID — idkit's `BridgeUrl` validator only relaxes the localhost check for staging app IDs. - js/examples/nextjs: React `<IDKitInviteCodeRequestWidget />` flow with a demo toggle to switch between QR and code modes. - swift/Examples/IDKitSampleApp: Swift FFI sample with the invite-code mode wired up via `presetWithInviteCode(_:)`. Polling and proof verification are unchanged from QR mode — same `Status` values, same `IDKitCompletionResult`. Adopter diff is two lines per example. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
85d60db to
fba0b3b
Compare
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
Stacked on top of #240 (core API). Adds runnable demos of the invite-code flow across the three example apps.
js/examples/browser— vanilla integration ofIDKit.requestWithInviteCode(...). Adds a "Use invite code" toggle alongside QR mode, an editable App ID input, and a Bridge URL input that flows intorequest.bridge_urlso the example can target a local wallet-bridge during development. Local bridges overhttp://localhost:*require anapp_staging_App ID — idkit'sBridgeUrlvalidator only relaxes the localhost check for staging app IDs.js/examples/nextjs— React<IDKitInviteCodeRequestWidget />flow with a demo toggle to switch between QR and code modes.swift/Examples/IDKitSampleApp— Swift FFI sample with invite-code mode wired up viapresetWithInviteCode(_:).Polling and proof verification are unchanged from QR mode — same
Statusvalues, sameIDKitCompletionResult. Adopter diff is two lines per example.Test plan
pnpm -C js/examples/browser dev— toggle "Use invite code" and confirm the 6-char code renders with countdown.pnpm -C js/examples/nextjs dev— toggle to invite-code mode in the demo and confirm the widget renders the code.Confirmed.Dependencies
/code/redeemand runs the iOS Selfie Check flow.🤖 Generated with Claude Code