Skip to content

Commit 17a0578

Browse files
vinckrunatasha8
andauthored
chore: update iframe doc (#2263)
* chore: update iframe doc * chore: apply suggestions from code review Co-authored-by: unatasha8 <[email protected]> * chore: apply suggestions from code review Co-authored-by: unatasha8 <[email protected]> --------- Co-authored-by: unatasha8 <[email protected]>
1 parent bf65366 commit 17a0578

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

docs/troubleshooting/30_iframes.mdx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,26 @@ sidebar_label: Troubleshooting iframes
55
---
66

77
Iframes can pose a significant security risk for authentication services due to many attack vectors such as clickjacking, iframe
8-
injection, iframe phishing, and many others.
8+
injection, iframe phishing, and others. Most browsers have implemented measures to block cookies in iframe contexts that break
9+
authentication, CSRF-prevention, and sessions.
910

10-
Safari has additionally implemented a feature called
11-
[Intelligent Tracking Prevention](https://webkit.org/blog/7675/intelligent-tracking-prevention/) that blocks third-party cookies
12-
by default in iframe contexts, which breaks authentication, CSRF-prevention, and sessions. Chrome is planning on rolling out the
13-
same changes in 2024.
11+
- Safari has implemented [Intelligent Tracking Prevention](https://webkit.org/blog/7675/intelligent-tracking-prevention/) which
12+
blocks third-party cookies by default.
13+
- Firefox has implemented
14+
[Total Cookie Protection](https://blog.mozilla.org/en/mozilla/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/)
15+
which gives third-party cookies a separate cookie jar per site by default, preventing cross-site tracking.
16+
- Google Chrome only blocks third-party cookies in Incognito mode by default, but users can set Google Chrome to block all
17+
third-party cookies in regular mode. As an alternative, Google has implemented FedCM, which Ory supports. Read more about
18+
[FedCM](../kratos/social-signin/fedcm.mdx).
19+
- Edge blocks trackers by default. Microsoft is also exploring blocking third-party cookies in Edge by default.
20+
- Brave browser blocks third-party cookies by default.
1421

15-
We therefore discourage use of iframes when using Ory and have implemented HTTP headers (`X-Frame-Options: DENY`) indicating to
16-
browsers that iframes can not be used with the Ory Account Experience.
22+
:::danger
23+
24+
Identity flows, such as authentication, login, registration, and MFA, must not be embedded inside an iframe! Embedding these flows
25+
increases the risk of phishing, session hijacking, and clickjacking.
26+
27+
:::
28+
29+
Ory has implemented HTTP headers (`X-Frame-Options: DENY` and `Content-Security-Policy: frame-ancestors 'none'`) to indicate to
30+
browsers that iframes can't be used with the Ory Account Experience self-service user flows.

0 commit comments

Comments
 (0)