-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FedCM vs Storage Access API use case #501
FedCM vs Storage Access API use case #501
Comments
Good question! I don't know which one will be better for your particular scenario. If you can attend FedID CG calls, you are welcome to as we do discuss the intersection sometimes. I think the tradeoff is that SAA is more general so the user agent will likely have more generic prompts whereas FedCM is more tailored so will have a more specific federated-login prompt. I will note that there is already FedCM support for iframes on Chrome. See https://github.com/fedidcg/FedCM/blob/main/explorations/iframe_support.md for more info, feel free to give it a shot and let us know if it worked for your use case! |
@npm1 Thank you for your response! I'm going to further investigate FedCM and try to apply it in our case 🙏 |
Hi @egor-limenko, I think your assessment is pretty accurate already. SAA provides a bit more flexibility, including the ability to send actual cookies vs. "credential" identifiers, but if you can live with the reduced flexibility then FedCM is definitely the ideal choice for (federated) login flows. I'd recommend giving FedCM a shot first to see if it's compatible with your site. If you need cookie access as part of FedCM, we're thinking about auto-granting SAA based on a prior FedCM grant and would like to see interest from developers in #467. |
@johannhof Thanks for clarification, I would continue investigating FedCM and provide my feedback in the corresponding topic. |
re documentation update: please check out this blog post that has all major updates since we shipped FedCM in Chrome M108. We'd also suggest subscribing to the newsletter for any future updates. |
@johannhof @npm1 Hey, there is another difference with those two technologies that I'd like to clarify: |
@egor-limenko well, the IdP itself has to make that SAA call, though we're pondering an option for enabling top-level documents to make this call on behalf of their embeds via the rSAFor API. The tricky thing here is ensuring proper opt-in by the IdP, which is why in Chrome we're currently limiting the API to First-Party Sets (which is being renamed to Related Website Sets, FYI), and still require a requestStorageAccess call (without user gesture) by the IdP iframe. With FedCM that is definitely a requirement though, yeah. |
@johannhof So couple of things to clarify based on your answer:
|
A domain can only be part of a single 1p set, leaving other questions aside (to my understanding). So that is not something the would fit for you. |
@egor-limenko to be clear, if you don't have any way to change the site that needs the 3rd party cookie access, none of the new APIs (neither FedCM, SAA or RWS) will help you. You can't opt other sites into cross-site data sharing, to protect their security and reputation. The signal has to come from the affected site itself. However, if you do control the site that needs to access third-party cookies in an iframe, then you could use the Storage Access API (as you seem to have done already looking at your initial comment) , potentially in combination with Related Website Sets. Happy to give additional guidance if you want to share more details about your setup, specifically which sites in your flow you can change and where user interaction happens :) |
@johannhof Sorry if it sounded confusing, I meant that we don't have access to the top-level site that does the embedding of the iframe. We have full access to the iframe itself and it's code however. As an update, Storage Access API proven to work in our case, however with a severe impact on UX. I will describe it step-by-step.
Now, updated flow with usage of Storage Access API:
As you see, when user tries to request storage access for the first time, it requires him to proceed through multiple extra steps. We consider this as one of the solutions for the problem, but at the same time from product perspective such affect on user experience is undesirable... |
This sounds a lot like the problem I presented at TPAC last week. So, in short, we're generally very aware of this usability issue and want to solve it, but we're not there yet. |
@johannhof Thanks for sharing. Will look closely for updates |
Hey! I have a use case where I'm embedding an iframe in the third-party application. This iframe can execute an SSO process in a separate popup, which is from the same domain as the iframe. SSO auth sets cookies, that are going to be considered third-party for the host app, and this flow break when Third-party cookies are disabled.
While playing around with Chrome 117 beta, I was able to handle this case with iframe using Storage Access API. Though it looks like, based on the description, FedCM proposal is aimed to handle federated identity cases affected by third-party cookies phase out, which applies to my use case. So I'm trying to understand, which approach suits better (FedCM vs SAA)? Overall it looks like Storage Access API requires less effort to implement, but FedCM is tailor made to handle "Sign with" processes like SSO.
It also seems that FedCM still does not support cross-origin iframe, but Google plans to address it.
The text was updated successfully, but these errors were encountered: