docs: add IDKit invite-code mode page#111
Conversation
Documents the cross-device verification flow added in idkit APP-9428, where the relying party shows a 6-character code the user types into World App on a different device instead of scanning a QR. - New page world-id/idkit/invite-code.mdx covering when to use the mode, the code format, lifecycle, and JS/React/Swift integration. - Wired into IDKit nav between Integrate and Signatures. - Cross-link from the standard Integrate page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
||
| ## When to use it | ||
|
|
||
| Use invite-code mode when the relying party (your app) and World App are reliably **on different devices** — for example, a desktop browser experience where the user has World App on their phone. Typing a 6-character code is more robust than asking the user to point a phone camera at their own laptop screen. |
There was a problem hiding this comment.
This isn't the reason we built it, but is something we ensured worked. The reason to use this feature is to expedite onboarding users into the World Network. The app uses the code to show in-app flows that users complete as part of onboarding to respond to the IDKit request.
| }, | ||
| allow_legacy_proofs: true, | ||
| environment: "production", | ||
| }).preset(orbLegacy({ signal: "user-123" })); |
There was a problem hiding this comment.
Let's put the selfie check preset here since that's the hero use case for this atm.
|
|
||
| ### Display the code | ||
|
|
||
| Show `code` prominently. A formatted display (`ABC-DEF` in a large, monospaced font) is easier to read aloud and harder to mistype than the unseparated form. The Next.js example app and iOS sample app in the IDKit repo both ship a reference UI you can crib from. |
There was a problem hiding this comment.
Remove comments on reading the code aloud.
There was a problem hiding this comment.
"Crib from" is unprofessional - "can be referenced" is better, but we're also going to provide at least a react component so this shouldn't be really mentioned.
- Reframe "When to use it" to lead with the onboarding use case (the hero use case is letting World App run in-app onboarding flows so users can satisfy a credential they don't yet hold); cross-device is now described as a secondary fit. - Switch JS/React/Swift examples and the migration diff to selfieCheckLegacy so the doc reflects the current hero preset. - Remove the "easier to read aloud" line and the reference to the example apps under "Display the code" — a React component will ship for that surface. - Update the cross-link in integrate.mdx to match the new framing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
||
| ## When to use it | ||
|
|
||
| Invite-code mode is built to **expedite onboarding users into the World Network**. When a user enters your app's invite code into World App, World App uses it to launch the in-app onboarding flows the user needs to complete in order to satisfy your IDKit request. This lets you request a credential the user does not yet hold — World App walks them through getting it, then returns the proof to your app. |
There was a problem hiding this comment.
Add a note that this is for iOS only
Trim the overview and move per-SDK details to the existing reference pages so the structure matches how other IDKit features are documented. - Tighten the lede; collapse "When to use it" to two paragraphs. - Drop the Crockford / check-character internals — feature pages don't explain crypto details (signatures.mdx is the spec page). - Drop the inline "Migrating from QR mode" section — migration content belongs on 4-0-migration.mdx. - Replace the three Markdown API tables with a "SDK references" link list pointing into the per-language pages. - Add a Warning callout about generating rp_context server-side. - Show the RpContext(...) constructor in the Swift sample so it parallels JS/React. - Add "Invite-code mode" sections to javascript.mdx, react.mdx, and swift.mdx using the existing terse-bullet style of those pages. - Add IDKit.requestWithInviteCode and selfieCheckLegacy to the JS entry-points list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Invite-code redemption is currently shipped only in World App for iOS; Android users cannot redeem a code today. Surface the constraint as a Note callout on the overview page and append it to the cross-link in integrate.mdx so anyone evaluating the feature sees it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| Invite-code mode displays a short 6-character code in your app that the user enters into World App. World App treats the code as an entry point to the in-app onboarding flows the user needs to complete in order to satisfy your IDKit request, then returns the proof. | ||
|
|
||
| <Note> | ||
| Invite-code mode requires World App on iOS. |
There was a problem hiding this comment.
Probably worth a note that only selfie-check is supported atm. As we add the other credentials we can update the docs.
Invite-code mode currently only works with the selfie-check preset. Add a Note alongside the iOS-only one so the constraint is visible on the overview page; the docs will be updated as support is added for other credentials. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Without the blank lines, <CodeGroup> opens a CommonMark Type-7 HTML block that swallows the inner code fences — backticks render as literal text on github.com. Adding a blank line after the opening tag and before the closing tag ends the HTML block, letting the fences parse as Markdown. Mintlify renders the same either way. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop title="React" and title="Swift" from the CodeGroup so GitHub renders the fences correctly (matches the JS fence). - Add a paragraph after the CodeGroup explaining why allow_legacy_proofs: true is required (selfieCheckLegacy is a v3 preset), so a copy-paste user trying a non-legacy preset later isn't surprised. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Documents invite-code mode (WDP-73 / idkit
app-9428): the user enters a 6-character code in World App, which uses it as the entry point to in-app onboarding flows that fulfill the IDKit request.world-id/idkit/invite-code.mdx— when to use, code format, lifecycle, multi-language example.javascript.mdx,react.mdx,swift.mdxin the existing terse-bullet style.integrate.mdx; sidebar entry between Integrate and Signatures.selfieCheckLegacyis the only supported preset today.