Skip to content

docs: cross-origin hardening warnings on existing iframe pages - #780

Open
justinformentin wants to merge 3 commits into
mainfrom
docs/frames-cross-origin-breaking-change
Open

docs: cross-origin hardening warnings on existing iframe pages#780
justinformentin wants to merge 3 commits into
mainfrom
docs/frames-cross-origin-breaking-change

Conversation

@justinformentin

@justinformentin justinformentin commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Adds concise callout warnings directly on existing iframe-related pages rather than a standalone page. Four existing pages updated, no new page added.

Changes

sdks/advanced/iframe-stamper.mdx

Added a <Warning> after the intro: cross-origin hardening security update, import breaking change (ERROR when organizationId/userId missing), upgrade to >= 2.0.0 required.

snippets/shared/import-wallets.mdx

Added a <Warning> in the Embedded iframe section: breaking change — import iframe now returns ERROR when fields are missing, must upgrade to >= 2.0.0.

snippets/shared/export-wallets.mdx

Added a <Note> in the Embedded iframe section: export iframe cross-origin hardening, no breaking change, upgrade to >= 2.1.0 recommended. (This snippet is reused by features/wallets/export-wallets.mdx.)

sdks/advanced/client-side-signing.mdx

Added a <Note> near the top: export-and-sign iframe cross-origin hardening, upgrade to >= 2.1.0 recommended.

docs.json

Reverted the nav entry added in the previous commit (no standalone page).

Not touched

  • sdks/advanced/frames-cross-origin-hardening.mdx — deleted (was created in first commit, now removed)
  • changelogs/iframe-stamper/readme.mdx — left untouched; tracks npm package releases, not server-side frame deploys
  • features/wallets/import-wallets.mdx / features/wallets/export-wallets.mdx — pure snippet imports; edits went into the snippets instead

- Add sdks/advanced/frames-cross-origin-hardening.mdx documenting the
  breaking change in the import frame (now throws ERROR when organizationId
  or userId are missing), plus the MessageChannel and postMessage hardening
  across auth, import, and export-and-sign frames.
- Add new page to docs.json nav after iframe-stamper entry.

The primary user-facing impact: @turnkey/iframe-stamper < 2.0.0 (or
custom integrations omitting organizationId/userId) will now receive
an ERROR from the import frame. Fix is to upgrade to >= 2.0.0.
@mintlify

mintlify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated (UTC)
turnkey-docs 🟢 Ready View Preview Aug 14, 2026, 3:43 PM

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

Instead of a standalone page, add concise callouts directly on the
affected existing pages:

- sdks/advanced/iframe-stamper.mdx: Warning about cross-origin
  hardening + import breaking change (ERROR when organizationId/userId
  missing). Upgrade to >= 2.0.0 required.
- snippets/shared/import-wallets.mdx: Warning in the Embedded iframe
  section — breaking change is most relevant here.
- snippets/shared/export-wallets.mdx: Note in the Embedded iframe
  section — cross-origin hardening, no breaking change, upgrade to
  >= 2.1.0 recommended.
- sdks/advanced/client-side-signing.mdx: Note near top — export-and-sign
  iframe hardening, upgrade to >= 2.1.0 recommended.
- docs.json: Revert nav addition (no standalone page any more).

changelogs/iframe-stamper/readme.mdx left untouched (tracks npm
package releases, not server-side frame deploys).
@justinformentin justinformentin changed the title docs: frames cross-origin hardening (breaking change) docs: cross-origin hardening warnings on existing iframe pages Aug 14, 2026

@ethankonk ethankonk left a comment

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.

small nit, can ignore if you want!

Comment on lines +72 to +74
<Note>
Versions of `@turnkey/iframe-stamper` below 2.0.0 are vulnerable to cross-origin attacks. If you are using an older version, upgrade to 2.0.0 or later.
</Note>

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.

I think a list of higher level SDK versions patching this would also be valuable here, we'd prob want to list the versions of the following SDKs that include this patch:

@turnkey/sdk-browser - technicality, uses frames for session key storage
@turnkey/react-wallet-kit
@turnkey/sdk-react

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