Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Removed mention of session constraints in the proof request section.
Removed section on handling the result in the backend, including example code for verifying proof.
Removed backend RP signature generation section and related examples from the README.
…into kartike/add-session-doc
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 255db6a8df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```tsx | ||
| import { useIDKitSession, CredentialRequest } from "@worldcoin/idkit"; | ||
|
|
||
| const rp_context = await fetch("/api/rp-signature").then((r) => r.json()); |
There was a problem hiding this comment.
Fetch a fresh RP context for each hook attempt
This module-level fetch reuses one nonce and signature for every flow.open() during the page lifetime; the request example repeats the same pattern. Since signRequest defaults to a five-minute TTL and the nonce is single-use, a user who waits before clicking or retries after a reset will receive rp_signature_expired or duplicate_nonce. Generate a new rp_context for each attempt rather than once when the module loads.
Useful? React with 👍 / 👎.
Remove comment about fresh rp_context for request creation.
| const rp_context = await fetch("/api/rp-signature").then((r) => r.json()); | ||
|
|
||
| function CreateSessionExample() { | ||
| const flow = useIDKitSession({ |
There was a problem hiding this comment.
RPs should default to using the react widgets; otherwise they should use the js core library
…into kartike/add-session-doc
Added fetching of rp_context for session creation and proof.
What
edited the readme in js/packages/core
IDKit.createSessionand how that's different than requests created viaIDKit.requestWhy
the js core package is our most used entrypoint into world ID. The migration documentation from v3.0 to v4.0 is a little unfinished / messy, as parallel documentation exists for legacy proof creation flows and v4.0 in the docs but not necessarily in this github
Note
Low Risk
README-only changes with no runtime, API, or security behavior modifications.
Overview
Documentation-only updates to
@worldcoin/idkit-coreand@worldcoin/idkitREADMEs to clarify v4 integration paths and align examples with current APIs.Both packages get a Quickstart that splits session-scoped proofs (
createSession/proveSessionorIDKitSessionWidget+existing_session_id) from action-scoped requests (IDKit.request/IDKitRequestWidgetwithaction, nullifier handling, and backend verify). Examples now passrp_contextstraight from the backend instead of hand-assembling fields, documentCredentialRequest/.constraints()as the default v4 path, and call out backend verification via/api/v4/verify/{rp_id}.Core README also reframes RP signing (optional
actionfor sessions), consolidates preset/legacy guidance (sessions don’t use presets), trims duplicate verify snippets, and drops the “zero dependencies, WASM-powered” tagline. React README de-emphasizes headless hooks in highlights, mirrors the session vs request widget flows, and addsIDKitInviteCodeRequestWidgetfor cross-device use.Reviewed by Cursor Bugbot for commit 2c2ce41. Bugbot is set up for automated code reviews on this repo. Configure here.