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

Is there a way to maintain UI hint freshness without falling back to heavyweight FedCM #40

Open
bvandersloot-mozilla opened this issue Sep 4, 2024 · 9 comments

Comments

@bvandersloot-mozilla
Copy link
Collaborator

Coming from the first comment on the TAG review request, this may be worth considering.

@bvandersloot-mozilla bvandersloot-mozilla added the agenda+F2F Request to add this issue or PR to the agenda for our upcoming F2F. label Sep 4, 2024
@samuelgoto
Copy link

Is there a way to maintain UI hint freshness without falling back to heavyweight FedCM?

I think the answer is: "yes" with a "but".

There are two solutions that I'm aware of:

  • The first involves Web Push. However, by the time that you involve Web Push, you have to spin up a lot of server-side infrastructure.
  • The second involves using expiration dates and triggering the "Sign-in to IdP" flows to refresh them. That's likely a lot more ergonomical for IdPs, at a small cost for users (with expired hints).

Just as a data point in case it helps, we heard from IdPs that they have strict freshness requirements (e.g. in the order of hours, not days).

@bvandersloot-mozilla
Copy link
Collaborator Author

I think the answer is: "yes" with a "but".

That's my sense as well.
I think these are two interesting choices for IdPs to have. I'm curious what infrastructure requirements are like for Web Push, as I've never deployed its use to a production environment before.

@bvandersloot-mozilla
Copy link
Collaborator Author

From the meeting, an alternative would be to allow two new behaviors, depending on how many IDPs are present in the request.

  1. If there is only one, then open the login page if one is provided, as if the credential doesn't exist.
  2. If there is more than one, add an optional account chooser that relies upon an IDP-endpoint request to let the user pick a particular account.

(1) has the downside of maybe facilitating more "blinking" popups or redirects.
(2) devolves to an "IDP chooser" rapidly for short-lived UI hints.

@bvandersloot-mozilla
Copy link
Collaborator Author

Relatedly, from #42 we are talking about adding pull requests for the token endpoint. This is akin to option 2 above.

@bvandersloot-mozilla
Copy link
Collaborator Author

I think (1)'s downside can be resolved by requiring sticky user activation to store a credential! I lean toward that direction, and allowing stores in workers to facilitate using the Push API. There was a comment in the meeting with the push API requiring notifications, and I think that is reasonable given the infrequency of user information updates.

@samuelgoto
Copy link

(1) would certainly lead to the best UX and Privacy properties, I believe. It is unclear to me whether that's too big of a lift to IdPs or not, but seems like a better place to start from.

@samuelgoto
Copy link

@cbiesinger
Copy link

Just ran into this, and may help:

https://developer.mozilla.org/en-US/docs/Web/API/Web_Periodic_Background_Synchronization_API

That requires installing the app as a PWA, and exposes user activity & IP address to the IDP. (We considered that in https://github.com/w3c-fedid/FedCM/blob/main/meetings/2022/FedCM_%20Options%20for%20the%20Timing%20Attack%20Problem%202022-08-31.pdf)

@wseltzer
Copy link

@bvandersloot-mozilla bvandersloot-mozilla removed the agenda+F2F Request to add this issue or PR to the agenda for our upcoming F2F. label Oct 15, 2024
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

No branches or pull requests

4 participants