Skip to content

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
app-9428
Open

feat(examples): invite-code mode in browser, Next.js, and iOS samples (APP-9428)#239
SeanROlszewski wants to merge 1 commit intoapp-9428-corefrom
app-9428

Conversation

@SeanROlszewski
Copy link
Copy Markdown
Contributor

@SeanROlszewski SeanROlszewski commented May 2, 2026

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 of IDKit.requestWithInviteCode(...). Adds a "Use invite code" toggle alongside QR mode, an editable App ID input, 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 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.

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.
  • Run the iOS sample, switch to invite-code mode, confirm the code surfaces with the same expiry semantics.
  • End-to-end: enter the code in World App on iOS (APP-9424), confirm proof completes and the RP poll loop resolves to Confirmed.

Dependencies

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

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

@SeanROlszewski SeanROlszewski changed the title feat: invite-code mode for cross-device RP flows (WDP-73 / APP-9428) feat: invite-code mode for cross-device RP flows (WDP-73) May 4, 2026
@SeanROlszewski SeanROlszewski changed the title feat: invite-code mode for cross-device RP flows (WDP-73) feat(examples): invite-code mode in browser, Next.js, and iOS samples (APP-9428) May 4, 2026
@SeanROlszewski SeanROlszewski changed the base branch from main to app-9428-core May 4, 2026 04:17
…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>
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