Skip to content

chore: document environment assertion - #182

Merged
Takaros999 merged 1 commit into
mainfrom
takis/document-environment-assertion
Sep 14, 2026
Merged

Takaros999 merged 1 commit into
mainfrom
takis/document-environment-assertion

Conversation

@Takaros999

Copy link
Copy Markdown
Contributor

No description provided.

@mintlify

mintlify Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated
world 🟢 Ready View Preview Sep 14, 2026, 9:02 PM

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

@Takaros999
Takaros999 marked this pull request as ready for review September 14, 2026 21:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T21:02:35.554326Z d27863c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary to hand hold in the code snippet as well

@Takaros999
Takaros999 merged commit a4974d5 into main Sep 14, 2026
9 checks passed
@Takaros999
Takaros999 deleted the takis/document-environment-assertion branch September 14, 2026 21:10
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