Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fbdc8e6
docs: add IDKit invite-code mode page
SeanROlszewski May 1, 2026
1767ec5
docs: address PR review on invite-code page
SeanROlszewski May 1, 2026
638ca50
docs: align invite-code page with IDKit house style
SeanROlszewski May 1, 2026
9e12ff2
docs: flag invite-code mode as iOS-only for now
SeanROlszewski May 1, 2026
f48194a
Apply suggestion from @SeanROlszewski
SeanROlszewski May 1, 2026
d45490b
docs: flag selfieCheckLegacy as the only supported preset
SeanROlszewski May 1, 2026
2ee44c4
Apply suggestion from @SeanROlszewski
SeanROlszewski May 1, 2026
0374aee
Apply suggestion from @SeanROlszewski
SeanROlszewski May 1, 2026
0de1f5c
Apply suggestion from @SeanROlszewski
SeanROlszewski May 1, 2026
c7c1115
Apply suggestion from @SeanROlszewski
SeanROlszewski May 1, 2026
449f834
docs: blank-line CodeGroup so GitHub renders it as markdown
SeanROlszewski May 1, 2026
a598264
Update dox
SeanROlszewski May 1, 2026
ef3970e
docs: drop remaining title= attrs and explain allow_legacy_proofs
SeanROlszewski May 1, 2026
b5ddd2f
docs: add verification flows page (hot, warm, cold)
SeanROlszewski May 6, 2026
f63d2c4
docs: move verification-flows before invite-code in nav
SeanROlszewski May 6, 2026
1d4b65c
docs: reframe verification flows as user-determined paths
SeanROlszewski May 6, 2026
19e1466
docs: spell out the two factors that determine verification flow
SeanROlszewski May 6, 2026
0644784
docs: tweak verification flows intro wording
SeanROlszewski May 6, 2026
0983b4c
docs: s/proof consent modal/proof consent/
SeanROlszewski May 6, 2026
7c2a9e0
docs: add App Clip section for iOS document enrollment cold flow
SeanROlszewski May 6, 2026
80d3e74
docs: replace hot/warm/cold prose with summary table
SeanROlszewski May 6, 2026
cad6528
docs: rewrite iOS default cold flow without re-trigger assumption
SeanROlszewski May 6, 2026
d6c9720
docs: add migration section to invite-code mode
SeanROlszewski May 6, 2026
69d48b0
docs: merge invite-code page into verification-flows
SeanROlszewski May 6, 2026
446b4db
docs: trim invite-code persistence detail
SeanROlszewski May 6, 2026
827158e
docs: fix invite-code flow step 2 to reflect current behavior
SeanROlszewski May 6, 2026
1bb9188
docs: reference hot/warm flow in cold flow steps
SeanROlszewski May 6, 2026
e41250c
docs: soften cold flow intro wording
SeanROlszewski May 6, 2026
f77caac
Merge branch 'main' into docs/idkit-invite-code-mode
SeanROlszewski May 6, 2026
eb527f6
docs: move invite-code migration to SDK references as code examples
SeanROlszewski May 6, 2026
af1ebe4
docs: address PR #111 review comments
SeanROlszewski May 6, 2026
715820b
docs: remove App Clip section from verification flows
SeanROlszewski May 6, 2026
16bb672
docs: fix inconsistent title casing in IDKit section
SeanROlszewski May 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"group": "IDKit",
"pages": [
"world-id/idkit/integrate",
"world-id/idkit/verification-flows",
"world-id/idkit/credentials",
"world-id/idkit/signatures",
"world-id/idkit/build-with-llms",
Expand Down Expand Up @@ -773,6 +774,10 @@
"source": "/world-id/id/idkit-v4-preview",
"destination": "/world-id/idkit/integrate"
},
{
"source": "/world-id/idkit/invite-code",
"destination": "/world-id/idkit/verification-flows#with-invite-code-mode"
},
{
"source": "/world-id/credentials/presets",
"destination": "/world-id/credentials#legacy-presets"
Expand Down
7 changes: 7 additions & 0 deletions world-id/idkit/integrate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ func handleRPSignature(w http.ResponseWriter, r *http.Request) {
</Warning>


<Note>
The steps below cover the standard request flow. Depending on whether the user
already has World App and the credential you're requesting, they may be taken
through a different experience. See [Verification flows](/world-id/idkit/verification-flows)
for details.
</Note>

# Step 4: Generate the connect URL and collect proof
You can test during development using the [simulator](https://simulator.worldcoin.org/) and setting `environment` to `"staging"`.

Expand Down
63 changes: 61 additions & 2 deletions world-id/idkit/javascript.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Javascript"
title: "JavaScript"
description: "Reference for `@worldcoin/idkit-core`"
"og:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png"
"twitter:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png"
Expand Down Expand Up @@ -27,7 +27,8 @@ yarn add @worldcoin/idkit-core
## Entry points

- `IDKit.request(config)` for uniqueness proofs
- `orbLegacy`, `secureDocumentLegacy`, `documentLegacy` for presets
- `IDKit.requestWithInviteCode(config)` for invite-code mode
- `orbLegacy`, `secureDocumentLegacy`, `documentLegacy`, `selfieCheckLegacy` for presets

Each entry point returns a builder. Finalize it with `.preset(...)`.

Expand Down Expand Up @@ -102,6 +103,64 @@ if (!completion.success) {
Outside World App, `connectorURI` is the URL you render as a QR code.
</Note>

## Invite-code mode

Use `IDKit.requestWithInviteCode(config)` to display a short code instead of a QR. Validation, the returned `Status` shape, and the poll loop are identical to `IDKit.request`. See [Invite-code mode](/world-id/idkit/verification-flows#with-invite-code-mode) for when to use it.

```ts
import { IDKit, selfieCheckLegacy } from "@worldcoin/idkit-core";

const request = await IDKit.requestWithInviteCode({
app_id: "app_xxxxx",
action: "my-action",
rp_context,
allow_legacy_proofs: true,
}).preset(selfieCheckLegacy({ signal: "user-123" }));

const code = request.code; // 6-character canonical form
const expiresAt = request.expiresAt; // Unix seconds
const completion = await request.pollUntilCompletion();
```

`IDKitInviteCodeRequest` exposes:

- `code`
- `expiresAt`
- `requestId`
- `pollOnce()`
- `pollUntilCompletion({ pollInterval, timeout })`

### Migrating from QR / connect-URL

```ts
// Before — QR / connect-URL flow
const request = await IDKit.request({
app_id: "app_xxxxx",
action: "my-action",
rp_context,
allow_legacy_proofs: true,
}).preset(orbLegacy({ signal: "user-123" }));

const connectorURI = request.connectorURI; // render as QR
const completion = await request.pollUntilCompletion();
```

```ts
// After — invite-code mode
const request = await IDKit.requestWithInviteCode({
app_id: "app_xxxxx",
action: "my-action",
rp_context,
allow_legacy_proofs: true,
}).preset(selfieCheckLegacy({ signal: "user-123" }));

const code = request.code; // display to user
const expiresAt = request.expiresAt; // drive a countdown
const completion = await request.pollUntilCompletion();
```

The config object is unchanged. Replace `connectorURI` (QR) with `code` and `expiresAt` in your UI. Polling, proof verification, and nullifier storage stay the same.

## Server-side helpers

Use subpath exports on your backend:
Expand Down
2 changes: 1 addition & 1 deletion world-id/idkit/onchain-verification.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "On-chain verification"
title: "On-chain Verification"
description: "Verify World ID proofs directly in Solidity for web3-native flows."
"og:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png"
"twitter:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png"
Expand Down
71 changes: 71 additions & 0 deletions world-id/idkit/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,77 @@ Hook result fields:
- `result`
- `errorCode`

## Invite-code mode

For invite-code flows, use `IDKitInviteCodeRequestWidget` (controlled) or `useIDKitInviteCodeRequest` (headless). Config matches `IDKitRequestWidget` / `useIDKitRequest` — invite-code mode adds no new required fields. See [Invite-code mode](/world-id/idkit/verification-flows#with-invite-code-mode) for when to use it.

```tsx
import { IDKitInviteCodeRequestWidget, selfieCheckLegacy } from "@worldcoin/idkit";

<IDKitInviteCodeRequestWidget
open={open}
onOpenChange={setOpen}
app_id="app_xxxxx"
action="my-action"
rp_context={rpContext}
allow_legacy_proofs={true}
preset={selfieCheckLegacy({ signal: "user-123" })}
handleVerify={async (result) => { /* ... */ }}
onSuccess={() => { /* ... */ }}
/>;
```

`useIDKitInviteCodeRequest` result fields (sibling of `useIDKitRequest`'s):

- `open()`
- `reset()`
- `isAwaitingUserConnection`
- `isAwaitingUserConfirmation`
- `isSuccess`
- `isError`
- `code`
- `codeExpiresAt`
- `result`
- `errorCode`

### Migrating from QR / connect-URL

```tsx
// Before — QR / connect-URL widget
import { IDKitRequestWidget, orbLegacy } from "@worldcoin/idkit";

<IDKitRequestWidget
open={open}
onOpenChange={setOpen}
app_id="app_xxxxx"
action="my-action"
rp_context={rpContext}
allow_legacy_proofs={true}
preset={orbLegacy({ signal: "user-123" })}
handleVerify={handleVerify}
onSuccess={onSuccess}
/>;
```

```tsx
// After — invite-code widget
import { IDKitInviteCodeRequestWidget, selfieCheckLegacy } from "@worldcoin/idkit";

<IDKitInviteCodeRequestWidget
open={open}
onOpenChange={setOpen}
app_id="app_xxxxx"
action="my-action"
rp_context={rpContext}
allow_legacy_proofs={true}
preset={selfieCheckLegacy({ signal: "user-123" })}
handleVerify={handleVerify}
onSuccess={onSuccess}
/>;
```

Swap the component and preset. Props, callbacks, and backend verification stay the same. The headless equivalent is `useIDKitInviteCodeRequest` in place of `useIDKitRequest`.

## Presets

React hooks/widgets take `preset` directly in config.
Expand Down
44 changes: 44 additions & 0 deletions world-id/idkit/swift.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,47 @@ case .failure(let error):
print(error)
}
```

## Invite-code mode

Use `presetWithInviteCode(_:)` on the builder to return an `IDKitInviteCodeRequest` instead of `IDKitRequest`. The polling surface is identical. See [Invite-code mode](/world-id/idkit/verification-flows#with-invite-code-mode) for when to use it.

```swift
let request = try IDKit.request(config: config)
.presetWithInviteCode(selfieCheckLegacy(signal: "user-123"))

let code = request.code // 6-character canonical form
let expiresAt = request.expiresAt // Date
let completion = await request.pollUntilCompletion()
```

### Migrating from QR / connect-URL

```swift
// Before — QR / connect-URL flow
let request = try IDKit.request(config: config)
.preset(orbLegacy(signal: "user-123"))

let connectURL = request.connectorURL // render as QR
let completion = await request.pollUntilCompletion()
```

```swift
// After — invite-code mode
let request = try IDKit.request(config: config)
.presetWithInviteCode(selfieCheckLegacy(signal: "user-123"))

let code = request.code // display to user
let expiresAt = request.expiresAt // drive a countdown
let completion = await request.pollUntilCompletion()
```

The config object is unchanged. Replace `connectorURL` (QR) with `code` and `expiresAt` in your UI. Polling, proof verification, and nullifier storage stay the same.

`IDKitInviteCodeRequest` exposes:

- `code: String`
- `expiresAt: Date`
- `requestID: UUID`
- `pollStatusOnce() async -> IDKitStatus`
- `pollUntilCompletion(options:) async -> IDKitCompletionResult`
Loading
Loading