-
Notifications
You must be signed in to change notification settings - Fork 99
Description
In some cases, it's desirable to require that sub frames use the same account as parent frames. For example, at Microsoft, Teams, Azure Dev Ops, and Sharepoint all have ecosystems with plugins, including both first party and third party plugins. For these ecosystems, our ideal behavior would be that after the user selects an account in the top-frame, the sub frames can only get the same account, and prompts that would allow the user to select an account are minimal (i.e. privacy, but not selection).
As the spec currently reads, it sounds like iframes can use FedCM with an appropriate permission policy, and there is discussion about the appropriate privacy treatment in the UI in #725 . However, those discussions do not prevent a user from e.g. selecting account1 in the top frame and account2 in a sub frame. Such selections will not typically result in reasonable behavior, as it may not even be obvious to the user which UI elements are part of the top frame and which UI elements are part of the sub frame.
This setup results in some undesirable implementation characteristics. The top frame must pass a login_hint down to the sub frame, identifying the user to the sub frame before the user has consent to the RP, so that the RP can pass the login_hint in IdentityProviderRequestOptions. It would be nice if the top frame could set some attribute or permission policy on the iframe that says the iframe is only allowed to sign the same user in, that causes the provider and login_hint from the top-frame selected account to be automatically passed on the iframe's navigator.credentials.get request, in a way that is privacy preserving (that does not allow the iframe to see the login_hint until the user consents to the RP). It would also be nice to save implementors of such super-apps from having to pass the login_hints around.