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

Specify "Use another account". #678

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

cbiesinger
Copy link
Collaborator

@cbiesinger cbiesinger commented Nov 4, 2024

This depends on PR #660 (Mode API).

Bug: w3c-fedid/active-mode#3


Preview | Diff

@cbiesinger cbiesinger requested a review from npm1 November 4, 2024 22:05
Copy link
Collaborator

@npm1 npm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case the user is signed in to just one account, it does not appear to show the use other account feature. So the logic needs to change to account for that

@cbiesinger
Copy link
Collaborator Author

In the case the user is signed in to just one account, it does not appear to show the use other account feature. So the logic needs to change to account for that

I updated the PR to add the additional logic where required, PTAL

Copy link
Collaborator

@npm1 npm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with nit

To <dfn>request permission to sign-up</dfn> the user with a given an {{IdentityProviderAccount}}
|account|, some {{IdentityProviderModeSettings}} |modeSettings|, an {{IdentityProviderAPIConfig}}
|config|, an {{IdentityProviderRequestOptions}} |provider|, and a |globalObject|, run the following
steps. This returns a boolean.
1. Assert: These steps are running [=in parallel=].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parallel steps would be better presented as bullets (which might bullets within a numbered step), rather than as numbered steps. As this stands, I am unsure exactly which steps are running in parallel.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would not be correct. Please check the definition of "in parallel": https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The definition of "in parallel" is not sufficient for me (and I have some familiarity with the subject) to know whether the numbered steps (1)-(20) of which this Assert is (1) are to run in parallel with each other (which appears possible, and indeed, the most likely meaning) or that this sequence of 20 steps is to occur in parallel with other operations (sequences, single steps, etc.) in the spec.

Presuming that one goal of writing this specification is to have it be comprehensible by readers who are new to the subject, I suggest that some rewording would be helpful.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A PR to the HTML spec is welcome, but I think it's pretty clear personally:

means those steps are to be run, one after another

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In parallel" does not mean "in sequence", no matter what spec is written as if it does.

Also, I highly doubt that most readers of this spec will go to the HTML spec, so while I may well submit a PR there (if I can find where to do so; it wasn't obvious when I looked for it yesterday), I think it better to provide more clarity in the FedCM spec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For better or worse, "in parallel" is an existing term in specland. Ted, do you have a specific suggestion for how to improve this?

In general we should assume that readers either know what these terms mean or click through to their definition, IMO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(https://github.com/whatwg/html/blob/main/source is where you would send PRs for the HTML spec)

Copy link
Contributor

@TallTed TallTed Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, GitHub's web interface (my primary tool) can't handle docs the size of that WHATWG source. But, I was able to view it, and noted the "parallel queue".

<p>A <dfn export>parallel queue</dfn> represents a queue of algorithm steps that must be run in 
series.</p>

I think that's a more apt description of this 20-step sequence. Something like

Suggested change
1. Assert: These steps are running [=in parallel=].
1. Assert: These steps comprise a [=parallel queue=] that should run [=in parallel=] with any other active algorithms and/or [=parallel queues=].

(That does presume that plurals of defined terms are properly handled; the last might need change from [=parallel queues=] to [=parallel queue=].)

I've added a note to whatwg/html#10049, but noting that they have 1923 open issues and 169 pending pull requests, I don't have high hopes of it being addressed in a timely fashion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenic — Your thumb-down emoji doesn't communicate even as well as the "in parallel" that is meant to be understood as some language other than English. If you have an argument against my points, please do me the courtesy of writing it out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am at a loss. @domenic, you are not participating usefully. Please refrain from emoting unexplained "thumb down". If you have an argument against what I've said, please put into words, so I and others can consider your point(s) against my own.

@cbiesinger cbiesinger added the agenda+ Regular CG meeting agenda items label Nov 13, 2024
@hlflanagan
Copy link
Contributor

Discussed on https://github.com/fedidcg/meetings/blob/main/2024/2024-11-26-notes.md. Needs further review.

@wseltzer
Copy link
Collaborator

wseltzer commented Jan 14, 2025

Discussed at January 14, 2025 meeting minutes

@bvandersloot-mozilla
Copy link
Collaborator

Why does this behavior need to be gated behind an IDP opt in?

@cbiesinger
Copy link
Collaborator Author

Why does this behavior need to be gated behind an IDP opt in?

As mentioned in one of the meetings, some IDPs do not support multiple accounts for one person so this would not be useful for them.

@bvandersloot-mozilla
Copy link
Collaborator

Follow up: is there a reason it varies between active and passive if it is expected to be per-IDP?

@hlflanagan hlflanagan removed the agenda+ Regular CG meeting agenda items label Feb 11, 2025
@cbiesinger
Copy link
Collaborator Author

We are happy to make this a single toplevel boolean supports_use_other_account. I will update the PR accordingly.

@cbiesinger
Copy link
Collaborator Author

@bvandersloot-mozilla @npm1 please take another look, I have updated the PR to use a single toplevel boolean.

@@ -1426,6 +1446,12 @@ an {{IdentityProviderAPIConfig}} |config|, an {{IdentityProviderRequestOptions}}
1. The user agent MAY use the
{{IdentityCredentialRequestOptions/context}} and |provider|'s
{{IdentityCredentialRequestOptions/mode}} to customize the dialog shown.
1. If |supportsUseOtherAccount| is true, the account chooser MUST
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should instead be covered by showing an initial step to select an account if this is true, otherwise go direct to request permission?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're suggesting that we should require showing the account chooser first if "supports use other account" is true, even if there is only one account signed in to the IDP?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea... that matches the Chrome implementation (for active mode which the only case we are keeping anyways)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable to me.

@yi-gu yi-gu added the agenda+ Regular CG meeting agenda items label Mar 19, 2025
aarongable pushed a commit to chromium/chromium that referenced this pull request Mar 19, 2025
Allows "supports_use_other_account" in the toplevel of the
config file.

Also renames "labels" in the account endpoint to "label_hints"
and flattens "accounts: { include: "foo" }" to just
a toplevel "account_label".

All changes behind the new "FedCmOtherAccountAndLabelsNewSyntax"
flag. Even with the flag enabled, the old syntax is still
accepted for now.

As per the discussions here:
w3c-fedid/FedCM#669
w3c-fedid/FedCM#678

Bug: 404568028
Change-Id: Iba33c5f546c68f35ca2a1228096a7a31a68767a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6370034
Reviewed-by: Nicolás Peña <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Commit-Queue: Christian Biesinger <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1435018}
@wseltzer
Copy link
Collaborator

Discussed March 25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agenda+ Regular CG meeting agenda items
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants