chore: document environment assertion - #182
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
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: d27863c6fb
ℹ️ 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".
|
|
||
| After completion, send the returned payload to your backend and | ||
| forward it directly to `POST https://developer.world.org/api/v4/verify/{rp_id}`. | ||
| forward it directly to `POST https://developer.world.org/api/v4/verify/{rp_id}`. Check that the verify response’s `environment` matches your backend’s expected environment (assert `"production"` for production integrations). |
There was a problem hiding this comment.
Enforce the environment check in the example
When a production backend receives a valid staging proof, the verifier can return HTTP 200 with environment: "staging", but the copyable handler immediately below checks only response.ok and returns success. Users following the example therefore do not implement the newly documented assertion and can accept proofs from the wrong environment; parse the response and reject it unless environment matches the backend's configured value before returning success.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
not necessary to hand hold in the code snippet as well
No description provided.