Skip to content

Conversation

vinckr
Copy link
Member

@vinckr vinckr commented Aug 1, 2025

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@@ -5,12 +5,26 @@ sidebar_label: Troubleshooting iframes
---

Iframes can pose a significant security risk for authentication services due to many attack vectors such as clickjacking, iframe
injection, iframe phishing, and many others.
injection, iframe phishing, and many others. Most browsers have implemented measures to block cookies in iframe contexts, which
Copy link
Contributor

@unatasha8 unatasha8 Aug 25, 2025

Choose a reason for hiding this comment

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

Suggested change
injection, iframe phishing, and many others. Most browsers have implemented measures to block cookies in iframe contexts, which
injection, iframe phishing, and others. Most browsers have implemented measures to block cookies in iframe contexts that

@@ -5,12 +5,26 @@ sidebar_label: Troubleshooting iframes
---

Iframes can pose a significant security risk for authentication services due to many attack vectors such as clickjacking, iframe
injection, iframe phishing, and many others.
injection, iframe phishing, and many others. Most browsers have implemented measures to block cookies in iframe contexts, which
breaks authentication, CSRF-prevention, and sessions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
breaks authentication, CSRF-prevention, and sessions.
break authentication, CSRF-prevention, and sessions.

[Intelligent Tracking Prevention](https://webkit.org/blog/7675/intelligent-tracking-prevention/) that blocks third-party cookies
by default in iframe contexts, which breaks authentication, CSRF-prevention, and sessions. Chrome is planning on rolling out the
same changes in 2024.
- Safari has implemented [Intelligent Tracking Prevention](https://webkit.org/blog/7675/intelligent-tracking-prevention/) that
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Safari has implemented [Intelligent Tracking Prevention](https://webkit.org/blog/7675/intelligent-tracking-prevention/) that
- Safari has implemented [Intelligent Tracking Prevention](https://webkit.org/blog/7675/intelligent-tracking-prevention/) which

blocks third-party cookies by default.
- Firefox has implemented
[Total Cookie Protection](https://blog.mozilla.org/en/mozilla/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/)
by default. This gives third-party cookies a separate cookie jar per site, preventing cross-site tracking.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
by default. This gives third-party cookies a separate cookie jar per site, preventing cross-site tracking.
which gives third-party cookies a separate cookie jar per site by default, preventing cross-site tracking.

- Firefox has implemented
[Total Cookie Protection](https://blog.mozilla.org/en/mozilla/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/)
by default. This gives third-party cookies a separate cookie jar per site, preventing cross-site tracking.
- Google Chrome only blocks third-party cookies in Incognito mode by default, but users can set it to block all third-party
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Google Chrome only blocks third-party cookies in Incognito mode by default, but users can set it to block all third-party
- Google Chrome only blocks third-party cookies in Incognito mode by default, but users can set Google Chrome to block all third-party

[Total Cookie Protection](https://blog.mozilla.org/en/mozilla/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/)
by default. This gives third-party cookies a separate cookie jar per site, preventing cross-site tracking.
- Google Chrome only blocks third-party cookies in Incognito mode by default, but users can set it to block all third-party
cookies. As alternative Google implemented FedCM, which Ory supports as well, read more about
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cookies. As alternative Google implemented FedCM, which Ory supports as well, read more about
cookies in regular mode. As an alternative, Google has implemented FedCM, which Ory supports. Read more about

- Google Chrome only blocks third-party cookies in Incognito mode by default, but users can set it to block all third-party
cookies. As alternative Google implemented FedCM, which Ory supports as well, read more about
[FedCM](../kratos/social-signin/fedcm.mdx).
- Edge blocks trackers by default. Microsoft are also exploring blocking third-party cookies in Edge by default.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Edge blocks trackers by default. Microsoft are also exploring blocking third-party cookies in Edge by default.
- Edge blocks trackers by default. Microsoft is also exploring blocking third-party cookies in Edge by default.

browsers that iframes can not be used with the Ory Account Experience.
:::danger

Authentication flows Login, registration, MFA and other identity flows must not be embedded inside an iframe! Embedding these
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Authentication flows Login, registration, MFA and other identity flows must not be embedded inside an iframe! Embedding these
Identity flows, such as authentication, login, registration, and MFA, must not be embedded inside an iframe! Embedding these

:::danger

Authentication flows Login, registration, MFA and other identity flows must not be embedded inside an iframe! Embedding these
flows increases risk of phising, session hijacking, and click jacking.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
flows increases risk of phising, session hijacking, and click jacking.
flows increases the risk of phishing, session hijacking, and clickjacking.

:::

Ory has implemented HTTP headers (`X-Frame-Options: DENY` and `Content-Security-Policy: frame-ancestors 'none'`) to indicate to
browsers that iframes can't be used with the Ory Account Experience.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
browsers that iframes can't be used with the Ory Account Experience.
browsers that iframes can't be used with the Ory Account Experience self-service user flows.

Copy link
Contributor

@unatasha8 unatasha8 left a comment

Choose a reason for hiding this comment

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

Fixed typos and added clarification for Ory Account Experience

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