Skip to content
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

Support for FedCM #1195

Open
ch-lepp opened this issue Oct 5, 2023 · 7 comments
Open

Support for FedCM #1195

ch-lepp opened this issue Oct 5, 2023 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ch-lepp
Copy link

ch-lepp commented Oct 5, 2023

Keycloak with its version 22.0.4 just released a fix for an issue regarding 3rd party cookies.

The problem is that certain oidc/oauth features require the use of cookies. In case the RP is hosted under a different domain than the IDP, those cookies are 3rd party cookies.
Due to privacy concerns, browsers implement an increasingly strict handling of 3rd party cookies, up to blocking them entirely.
This is even mentioned in the official oidc specs.

The new FedCM API is designed to help browsers mitigate this problem.
It however requires support from the IDP as well as from the RP.

So my question is: Do you have any plans for the foreseeable future to add support for the FedCM API?

@pamapa
Copy link
Member

pamapa commented Oct 5, 2023

I have no immediate plans to implement it, but would support and appreciate if anybody would like to see what FedCM means for this library. I guess the easiest would be someone with access to that feature on IDP side...

@pamapa pamapa added enhancement New feature or request help wanted Extra attention is needed labels Oct 5, 2023
@jonkoops
Copy link

Note we are tracking FedCM support in Keycloak (keycloak/keycloak#16834), and we intend to implement support for it relatively soon (a couple of months). It will however be behind a feature flag until the specification is finalized.

@deanmaster
Copy link

deanmaster commented Oct 12, 2023

hi @pamapa
in context of this API support from Keycloak, we are using oidc-client-ts in our projects (not keycloak adapter). Do I expect to have any problem with the integration if browser is really block 3rd party cookie ?

We are having many projects using this integration (oidc-client-ts communicate with Keycloak as IDP)

@jonkoops and @pamapa thanks a lot for your answer.

@jonkoops
Copy link

It might be worth it to attempt to use this library with the cookie protection set to the strictest modes possible in respective browsers, and see if this causes any issues that might have to be documented or worked around.

Specifically, we now emit an error status in Keycloak for the Session Status iframe when we do not have access to cookies (see keycloak/keycloak#23840 for historical discussion).

@pamapa
Copy link
Member

pamapa commented Oct 16, 2023

@jonkoops Would be great if you could elaborate a patch for this library to add support for it.

Probably something like:

public async signinSilent(args: SigninSilentArgs = {}): Promise<User | null> {
  ...
  if (this.settings.fedcm) { /* new configuration option */
   return await this._useFedCM();
  }
  ...

The fedcm part could go if larger into a new service or util file.

@jonkoops
Copy link

Yeah, I am not sure if you'd want to have FedCM part of the existing implementation like that, or if you would consider it essentially a whole separate client. I feel like it differentiates itself enough to have it's own FedCMClient or something like it, but things on the spec side are still very much work in progress.

@pamapa
Copy link
Member

pamapa commented Oct 19, 2023

I feel like it differentiates itself enough to have it's own FedCMClient or something like it, but things on the spec side are still very much work in progress.

I would be fine with this as long as it make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants