Skip to content

Fix invite-code mode API surface and TTL in docs#115

Merged
SeanROlszewski merged 1 commit into
mainfrom
fix/invite-code-docs-accuracy
May 6, 2026
Merged

Fix invite-code mode API surface and TTL in docs#115
SeanROlszewski merged 1 commit into
mainfrom
fix/invite-code-docs-accuracy

Conversation

@SeanROlszewski
Copy link
Copy Markdown
Contributor

Summary

  • request.code does not exist — The invite-code documentation across all four pages (verification-flows, javascript, react, swift) referenced a .code property on IDKitInviteCodeRequest that is not part of the public API. The actual property is connectorURI (TypeScript) / connectorURL (Swift) — the same connector URL shape as QR mode, with &c=<code>&a=<app_id> query params appended. The world.org/verify landing page reads those params to render an invite-code-aware view.
  • Code TTL is 15 minutes, not 10INVITE_CODE_TTL_SECONDS is 900 in rust/core/src/bridge.rs, which is 15 minutes. The docs said "ten minutes".
  • Swift requestID type is String, not UUID — In invite-code mode the request ID is an HKDF-derived hex string, not a UUID v4. The Swift wrapper correctly types this as String on IDKitInviteCodeRequest (vs UUID on IDKitRequest for the QR flow).
  • React hook result fielduseIDKitInviteCodeRequest exposes connectorURI, not code.

Files changed

File What changed
verification-flows.mdx TTL fix, request.coderequest.connectorURI (TS) / request.connectorURL (Swift)
javascript.mdx request.coderequest.connectorURI, API surface list corrected
react.mdx Hook result codeconnectorURI
swift.mdx request.coderequest.connectorURL, requestID: UUIDrequestID: String, API surface list corrected

Test plan

  • Verify code examples compile / type-check against @worldcoin/idkit-core and @worldcoin/idkit
  • Verify Swift snippet compiles against idkit-swift
  • Confirm TTL matches INVITE_CODE_TTL_SECONDS in bridge.rs

🤖 Generated with Claude Code

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 6, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
world 🟢 Ready View Preview May 6, 2026, 9:22 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

The invite-code documentation referenced a `.code` property on
`IDKitInviteCodeRequest` that does not exist in the SDK. The actual
API exposes `connectorURI` (TypeScript) / `connectorURL` (Swift),
which is the same connector URL as QR mode with `&c=<code>&a=<app_id>`
query params appended.

Also fixes:
- Code TTL: ten minutes → fifteen minutes (INVITE_CODE_TTL_SECONDS = 900)
- Swift `IDKitInviteCodeRequest.requestID` type: `UUID` → `String`
- React hook result field: `code` → `connectorURI`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@SeanROlszewski SeanROlszewski merged commit 54af20c into main May 6, 2026
9 checks passed
@SeanROlszewski SeanROlszewski deleted the fix/invite-code-docs-accuracy branch May 6, 2026 22:40
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.

2 participants