#1136: Incubation: FedCM: Support showing third-party iframe origins in the UI

Visit on Github.

Opened Aug 13, 2025

Explainer

https://github.com/w3c-fedid/FedCM/issues/449#issuecomment-1515631336

The explainer

Where and by whom is the work is being done?

  • GitHub repo: https://github.com/w3c-fedid/FedCM
  • Primary contacts:
    • Christian Biesinger (@cbiesinger), Google, Engineer
    • Yi Gu (@yi-gu), Google, Engineer
    • Nicolás Peña Moreno (@npm1), Google, Spec editor/engineer
  • Organization/project driving the design: Google
  • This work is being funded by: Google
  • Incubation and standards groups that have discussed the design:
  • Standards group(s) that you expect to discuss and/or adopt this work when it's ready: FedID WG

Feedback so far

  • Multi-stakeholder feedback:
  • Major unresolved issues with or opposition to this design:

Major opposition is Mozilla's opposition in the issue mentioned above. I would appreciate the TAG's view on this issue, especially on https://github.com/w3c-fedid/FedCM/issues/725#issuecomment-3053927241

You should also know that...

No response

<!-- Content below this is maintained by @w3c-tag-bot -->

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1136

Discussions

Log in to see TAG-private discussions.

Discussed Sep 8, 2025 (See Github)

Lola: I haven't looked at this yet.

Ehsan: I haven't read it carefuly. Don't have concrete opinion yet.

Lola: Am a bit biased the title doesn't fill me with hope.

Ehsan: It seems like the discussions have been around for a long time (2020?) I see Martin has an interaction so will ask him later for opinion.

Lola: I may be wrong about this but this is one of the proposals related to third-party cookies.

Matthew: What's the diff with https://github.com/w3ctag/design-reviews/issues/1145 ?

Lola: I'll ask them.

Discussed Sep 29, 2025 (See Github)

Matthew: Any updates? Ehsan: Have read the explainer, preparing review on it, hope to have the review by next week. … Don’t have any critical objections up until now. … Maybe next week we can discuss it in more detail. Matthew: Think we discussed this during the F2F in HK, there was confusion about a potential duplicate between issue #1145 vs. #1136. Let’s discuss this next week.

Discussed Oct 6, 2025 (See Github)

Ehsan: Review almost ready to post. Main concern is that removing one of the URLs (shwoing 2 instead of 3) may increase the chance of phishing/social engineering attacks. This is becuase they're delegating the task of specifying the iframe to the developer and trusting that they will act in good faith. This seems to be a fundamental question: it seems to reduce user confusion perhaps, but increase the chance of phishing and privacy leakages. I am slightly inclined to oppose it due to that. Whilst the likelihood isn't huge, it does present some risk. (That's a summary of what I'm about to post.)

Lola: Can you post that in the private thread and folks can review it? I have questions but would like to read it.

Ehsan: Yes, sure.

Lola: To Matthew's question yesterday about whether they have any mock-ups. I was looking at the web speech API today and they have a screenshot of what the UI could look like if you're using Web Speech APi - so I dont' think it's out of our remit to ask for something similar on this. Whislt it's up to the UA to decide on the UI, the spec authors could give us an idea.

Ehsan: My main issue is they're removing one of the URLs. If they can find a way to include all 3 It hink it would help.

Discussed Oct 6, 2025 (See Github)

Matthew: Bump to Breakout C. We thought the picture would be a mock-up of the UI, and it's just a flowchart. They want to minimize the number of domains you need to show. Ehsan has concerns about that. Death of the line of death. They say that sometimes they don't need to show all 3 domains. Where are they proposing to show 3 domains? Address bar, iframe, 3rd???

Lola: They're talking more about implementation than presentation.

Matthew: Get that we avoid talking about UI design, but want some illustration. Even some text.

Discussed Oct 20, 2025 (See Github)

Lola: +1 to your comment Ehsan

Ehsan: In general I'm in favor; have a couple of qustions about social engineering attacks that apply to the way they're doing it (in proposed comment).

Lola: You can just post - if any of us think of more questions we can add them.

Comment by @toreini Oct 23, 2025 (See Github)

Dear @cbiesinger , @yi-gy, @npm1,

We appreciate your detailed feedback on the proposal. To clarify and address our concerns, we would like to ask the following:

  • Attack Surface: The current proposal might increase the potential attack surface and questioned what triggered its recent reconsideration (especially in malicious RP and social engineering attack vectors). You mentioned a few potential attack scenarios in the Privacy and Security section. Could you elaborate on specific attack vectors you foresee when RP is malicious, and what safeguards could be implemented to minimise the risk of malicious developers?

    • Example attack (Phishing Scenario): an evil site could exploit the specification to deceive users if the iframe URL is not shown. Consider the following:

      • An evil site (kitten.com) could feature a button for authentication on google.com. However, when the user clicks it, the site loads gogle.com (a domain owned by the evil site).
      • Following this spec, the user will see kitten.com displayed above the iframe, maintaining trust in the authentication process without suspicion.
      • It doesn't matter whether the IdP is benign or malicious, or whether the authentication succeeds or fails, because gogle.com is already in the permission list of kitten.com, and the user has been presented with kitten.com on the iframe.
    • If the iframe had displayed all three URLs (gogle.com,kitten.com,idp.com), the user could have noticed the discrepancy.

  • Incognito Mode Behaviour: I am interested to know about the behaviour of the specification in incognito mode and potential information leakage. Could you clarify how the specification should handle private browsing modes to ensure user privacy and security?

We value your input and look forward to your further insights to refine the proposal and address these critical issues effectively.

Comment by @cbiesinger Oct 23, 2025 (See Github)

Was that written by AI? I have a hard time following it.

We appreciate your detailed feedback on the proposal

We were hoping for your feedback on the proposal

questioned what triggered its recent reconsideration

I have no idea what this means

Example attack (Phishing Scenario): an evil site could exploit the specification to deceive users if the iframe URL is not shown. Consider the following:

This proposal allows showing the iframe URL

An evil site (kitten.com) could feature a button for authentication on google.com. However, when the user clicks it, the site loads gogle.com (a domain owned by the evil site).

I can't follow this. Can you describe in more detail what the iframe origin is in this attack?

Are you suggesting that kitten.com embeds an iframe from gogle.com, and a dialog saying "Sign in to gogle.com with google.com. kitten.com embeds content from gogle.com" is a phishing risk (?)

Or alternatively, you are concerned about "Sign in to kitten.com with google.com" showing up (the status quo without the proposal) even though that token will get sent to gogle.com? But this attack requires kitten.com to cooperate with gogle.com, in which case it can skip the entire iframe and just ask the user to sign in to the toplevel frame directly.

It doesn't matter whether the IdP is benign or malicious, or whether the authentication succeeds or fails, because gogle.com is already in the permission list of kitten.com, and the user has been presented with kitten.com on the iframe.

Sorry, why does it not matter if the authentication fails? What is the bad thing that will happen?

If the iframe had displayed all three URLs (gogle.com,kitten.com,idp.com), the user could have noticed the discrepancy.

I assume you mean the fedcm dialog when you say "iframe". This proposal allows showing the iframe. I still don't follow the attack vector that requires the toplevel to conspire with the iframe because in that case the toplevel can skip the iframe entirely.

Incognito Mode Behaviour

That seems entirely unrelated to the specific change, but in general, FedCM will only use the cookies that were set in incognito mode. That is, FedCM does work in incognito, but only if the user signed in to the IDP within incognito mode.

Comment by @toreini Oct 23, 2025 (See Github)

Dear @cbiesinger ,

Thanks for the response. Let me clarify my comments better:

  1. The spec you submitted as explainer (which is in fact a comment in an issue) was written almost 3 years ago. Can you please point me to any meeting note/discussion that triggered this reconsideration so I can have better insight?

  2. As this is UI spec, I am not concerned about other potential attack scenarios at this stage of review, but I think all three URLs should be shown in the fedcm dialogue and replacing/removing any can be exploited if the RP is malicious. I am not trying to prove my proposed attack scenario is serious or not. I am asking if it is possible.

If kittens.com (top origin) conspires with gogle.com(as an iframe origin), then replacing the gogle.com signs in with idp.com with kitten.com signs in with idp.com will make a potential URL scam possible (of course if the top frame is a matched client to the RP iframe). If all three are shown at all times, at least the user can have a chance to recognise any potential attack.

So now, I ask my question again (regardless of being serious or not): Is the above scenario possible? If yes, then replacing the gogle.com with kitten.com does not really help the user make an informed decision (despite making the user less confused).

  1. Thanks for the clarification on the incognito mode ceremony.

I hope I am clear enough now.

Regards, Ehsan

Comment by @jyasskin Oct 23, 2025 (See Github)

@toreini I'm pretty sure that the proposed change is to show all 3 origins in some cases, where only 2 are currently shown. The "explainer" implies the opposite, but the title of this issue implies adding an origin.

Comment by @toreini Oct 23, 2025 (See Github)

@jyasskin , yes, you are right. What I am also trying to understand is whether showing 3 URLs at all times is better than only showing 3 in some cases (where RP had not specified a matched client), which is at the heart of this spec?

Comment by @cbiesinger Oct 24, 2025 (See Github)

Dear @cbiesinger ,

Thanks for the response. Let me clarify my comments better:

  1. The spec you submitted as explainer (which is in fact a comment in an issue) was written almost 3 years ago. Can you please point me to any meeting note/discussion that triggered this reconsideration so I can have better insight?

Apologies for the old explainer. I am also realizing I neglected to link to https://github.com/w3c-fedid/FedCM/issues/725 which is a more up-to-date summary.

I don't have anything public to point to, but we have heard from partners that they wanted their iframe domain to be visible in the dialog. For example, imagine a photo editor embedded inside a website, perhaps a book editor.

The photo editor may want to allow the user to sign in to their photo editor account so that they can access previously stored files. Showing only the toplevel domain would be misleading.

On the other hand, some websites (real example) trigger the fedcm dialog from a foostatic.com iframe. The dialog would show Sign in to foostatic.com with google.com and the subtitle would say foo.com embeds content from foostatic.com, which is not very meaningful to the user.

  1. As this is UI spec, I am not concerned about other potential attack scenarios at this stage of review, but I think all three URLs should be shown in the fedcm dialogue and replacing/removing any can be exploited if the RP is malicious. I am not trying to prove my proposed attack scenario is serious or not. I am asking if it is possible.>

If kittens.com (top origin) conspires with gogle.com(as an iframe origin), then replacing the gogle.com signs in with idp.com with kitten.com signs in with idp.com will make a potential URL scam possible (of course if the top frame is a matched client to the RP iframe). If all three are shown at all times, at least the user can have a chance to recognise any potential attack.

So now, I ask my question again (regardless of being serious or not): Is the above scenario possible? If yes, then replacing the gogle.com with kitten.com does not really help the user make an informed decision (despite making the user less confused).

Right now we show kitten.com (and the IDP, google.com). With the proposal we may show all three domains ("Sign in to gogle.com with google.com" with a subtitle "kitten.com embeds content from gogle.com"), depending on what the IDP tells us.

Your attack relies on having a harmless-looking toplevel origin that is actually malicious. But in this situation the toplevel frame can just trigger FedCM directly.

If you are imagining a benign toplevel and an evil iframe, this relies on the toplevel allowing the iframe to use FedCM with permissions policy (and CSP). And in this case, the IDP would tell the brower to show all three origins.

Discussed Oct 27, 2025 (See Github)

Jeffrey: We shoud clarify regarding the polarity mismatch between title and explainer.

Lola: We should decline to review when there isn't an Explainer (document) (rather there is just a comment). Or we should put them in a holding pattern.

Jeffrey: Sometimes a comment is appropriate when it's a small change. But this is above that threshold.

Lola: Martin proposed adding something to the process about AI. Check out Slack.

Matthew: Can we ask for more concrete examples (maybe there's a reason why they can't)? Think that would help a lot. Did appreciate the case they raised about apps within other apps, and signing in.

Lola: We should ask, yes. Leave it to them to let us know if they can't.

Jeffrey: +1 and this is a reason why they should write an explainer rather than comments. I think Ehsan is coming up with attacks based on the 'backwards' understanding of what they're doing (because their explainer had the order backwards). We should write our comments with the threat model they have in mind.

Discussed Nov 3, 2025 (See Github)

Lola: recapping prior discussion: we wanted to ask them for an explainer, and ask them for more concrete examples.

Ehsan: can draft something in private repo. Could you check out their last response? They seem to conflict somewhat with each other. I'll draft somethihng based on what we discussed.

Jeffrey: Is it clear they're asking about adding an extra domain?

Ehsan: Having 3 helps, but not clear on why in some cases they're going to make it 2. Despite the confusing title, I think the text is clear they want to add something, but in some cases they're proposing not to add the third. I don't think the branch with only 2 will help users.

Jeffrey: I'm not sure that question has come through - the question of 'why not always show all 3'.

Ehsan: I mentioned it in one comment

Lola: point 2 - but I don't think, from their responses, that they've picked up on that. I think it's worth emphasizing why 2 rather than 3 origins is an issue. Looks like they're not clear on what's important to us, and vice-versa. Clarifying would be good in next tommend.

Ehsan: I think Jeffrey's point about confusing title should be emphasized too. I'll draft something.

Lola: I'll check what you mentioend about their last two comments.

Discussed Nov 24, 2025 (See Github)

Lola: In the private brainstorm, Jeffrey and Ehsan, you seem to have been trying to work something out.

Ehsan: I have drafted a response to Jeffrey's comment. I agree with his first point. The second point as well, but. I think the one thing that is still ambiguous for me is the delegation of the permission of the top origin to annouce their relation to the iframe. So I have a small analysis that I will post later today, to make my point more clear by example.

After that, Jeffrey, we can have a better discussion. I tried to find the propenents at TPAC, but I couldn't find them.

Jeffrey: In future, if you need help running into a Googler at TPAC, that's my job.

Ehsan: Thank you.

Discussed Dec 1, 2025 (See Github)

Ehsan: I prepared a table for this, in terms of each circumstance or combination of iframe and top origin relationship. So at least for me, I summarised my concerns in the last two items in the conclusion. There are two things: the matching process is not clear at the IDP level, and the delegation of permission is on the top origin, which I don't think can be trusted for many reasons. Overall, the main issue is the wider cases that two be shown instead of three, and I'm proposing that all situations show three. Based on an ambiguous process, some need to output two URLs instead of three, and that would make users less informed.

This is for the cases in the authentication ceremony that the top origin calls the iframe where the origin is different than the top origin, and it only relates to the UX string shown in the authentication popup or prompt. in the current situation, the iframe origin and the IDP is shown. This spec is trying to add the relationship between the top origin and iframe to the picture as well, and proposing a mechanism that in some cases shows three origins and in some, two origins.

My problem is that that process is ambiguous, and if you want to make users informed, why not show all three?

The announement of the relationship is delgated to the top origin. If the intention of the top origin is not good, then it can lead to different outputs. In the table, I'm showing my understanding of the different outputs.

Jeffrey: the proponent's counter-argument to the bottom two rows is that, if the top origin doesn't want to show the iframe's origin, it can just call FedCM directly without an iframe. So what is the difference and why is it worse to hide the iframe that it's using?

If it... wants to be showing an iframe's origin, it can just call FedCM itself?

Ehsan: In that case, there is no need for this spec. They justified that there is a genuine need for an iframe to be called.

Jeffrey: the use case is for benign top-levels.

Lola: Does that prohibit malicious...?

Jeffrey: you can't.

Ehsan: That's too much trust.

Jeffrey: This is a convenience thing. Top-level origins delegate to an iframe for sign in. Sometimes they are doing it because the iframe origin is more trusted than the top level origin (accounts.google.com in another google.com domain where accounts is resistant to XSS but the other one isn't). But if you're a malicious top-level user, you could just inline the sign-in code in the top-level origin. You aren't going to use an iframe if you don't want to show it to the user.

Ehsan: I see your point. My concern is not about the technical vulnerability, it's focused on the amount of data the user has been shown. It's a UX spec. So the attacks are focused on social engineering. I think users need to be shown as much information as possible for authentication.

Lola: I'm stuck on this: when the top origin is good and the iframe is good, and the fedCM dialogue text is the same as when the iframe is good and the top origin is bad... That, to me, is highlighting the issue of not showing all three URLs. Those two conditions are enough to be like... If you can have a malicious top level origin present the same thing as a non-malicious one, that's not good.

Hadley: Ehsan, can you describe a use case where this would go horribly wrong with two URLs?

Ehsan: UX, so it's limited to the amount of information that's shown. It should show as much as possible. If there's no distinction beetween a good and bad top-level origin, users might not learn as much as they should. I had in mind that if gogle.com as the iframe is supposed to be the iframe that's used for URL scamming, then hiding it will cause some sort of problem for someone. Imagine that gogle.com is similar to Google. Then it could be used as social engineering.

Hadley: How does having a third URL mitigate that?

Ehsan: If the top-origin has bad intention, it would be hidden from the user.

Lola: Having the third URL might prevent the user from giving the information they might normally give?

Matthew: The main situation that we're talking about: you want to sign in to a site that is bad, in collusion with gogle.com, which isn't google.com, and it's trying to phish your account details. In that situation, there is collusion between gogle.com and the top-level frame. You could have a bad top level site that genuinely wants you to sign in with your google account. Badness is in the eye of the beholder. It's not trying to address that situation. It's trying to prevent you giving up your credentials for a valid service.

If it doesn't show all three URLs, you are denied the chance to realise you are signing in to gogle.com and not google.com.

I see what you're saying that if the top frame is bad and the iframe is good, it's a different problem. That's not what the focus is here.

I tend to agree, that not showing all three is inviting more opportunities to be phished. Ehsan has asked that we get them to be clear when they propose to only show two. They talk about relying on the top level origin to make it clear that it and the identity provider are related. So the top level origin (which could be malicious) is allowed to say if the sign-in origin is related. So you could sign into maps.google.com with accounts.google.com, and it doens't show both to the use as a convenience. but the party you are trusting that decision to could be malicious. It's concerning.

Jeffrey: gogle.com isn't helpful here, because the point is that it's confusing with "google.com". Showing it to the user could make it worse. So we need another example.

Hadley: evillogin.com?

Jeffrey: Right. So if the iframe is trying to attack the user, and they are trying to phish the user, there is nothing to stop the top level site from using FedCM to use evillogin.com.

Lola: If the iframe is evillogin.com, will showing all three URLs not at least help the user know that the URL is malicious?

Jeffrey: It helps, but we can't expect a malicious site to use it. There is no benefit to saying, "If you decide to use an iframe, then you have to show it", because if you're malicious and you don't want to show it, you won't use an iframe. If you're good, there are architectural reasons to use an iframe.

Lola: You don't think this invites more malicious attempts?

Jeffrey: I'm not completely sure, but we need to provide the actual use case to explain to the proponents what worries us.

Ehsan: I think it's about helping the user make an informed decision. That will be better achieved by presenting them everything.

Jeffrey: Not always true. Sometimes too much information isn't helpful.

Ehsan: I see your point, but you said there is a problem with FedCM anyway. The problem here is that there are two URLs shown to the user; let's present as much info as possible. But they said in some cases two, sometimes three... I think there should be some consistencies in making this process. I don't think that's helpful.

Jeffrey: The site already has a choice of whether to show two or three URLs, by choosing whether to use an iframe. This lets the site decouple that decision from whether to use an iframe. The question then is: what extra attacks would this allow?

Lola: I think we should think about what this would allow, if any. But I think Ehsan's question on reasons not to show three is good to put to them too. I agree with Jeffrey's point that sometimes too much info is bad, but I'd like to hear their thoughts. I don't think I've heard much justification about how this makes it easier or better for users.

Matthew: I see Jeffrey's point about, "if they're bad, they'll do it differently". I'm not sure that gogle.com is a bad example, but I suspect that if we work through the example, it would be clearer. I'd like to see that written down. And I don't think they're explaining the user need clearly.

Could we take off the conclusion part of Ehsan's comment and post it? At the same time, we could go through a few examples with concrete URLs and domain names, and explain what attacks we are concerned about.

Jeffrey: +1 to asking for a better explainer

Matthew: Also, is it a bug that you can call FedCM from the top level?

Hadley: Isn't that the point of FedCM?

Jeffrey: It's not the whole point, but we don't want to require that sites rely on a separate iframe to ask for federated login. You should be able to write a site on one page.

Lola: Ehsan, I think you should post your conclusion. Or just the question: why would we not want to show three? What are the use cases? Ask them specifically about the end user benefits on this? And their explainer is a comment, referring to other comments. A better one would be good.

Ehsan: I read through the comments. It has been mentioned, the problem of permission, and delegation of permission. I don't think there was a clear solution for it. I will draft a comment and post it here, so you two can make sure. Because of the history, I would like a second eye.