Skip to content

Specify the mode API - #660

Merged
npm1 merged 17 commits into
mainfrom
tttzach-patch-1
Nov 18, 2024
Merged

Specify the mode API#660
npm1 merged 17 commits into
mainfrom
tttzach-patch-1

Conversation

@tttzach

@tttzach tttzach commented Oct 2, 2024

Copy link
Copy Markdown
Collaborator

Comment thread spec/index.bs Outdated

@cbiesinger cbiesinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generally looks good. See comments below. We should probably add a Note: in some appropriate place that the user agent should consider displaying the account chooser in a louder way if mode is active.

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated

@TallTed TallTed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor, human-facing

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs
@tttzach tttzach changed the title Add mode for FedCM Specify the mode API Oct 4, 2024

@TallTed TallTed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

trivial, editorial

Comment thread spec/index.bs Outdated
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>

@cbiesinger cbiesinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, looks good modulo two minor comments

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@wseltzer

wseltzer commented Oct 15, 2024

Copy link
Copy Markdown
Collaborator

Discussed in Oct. 15 call. [minutes to be linked]
https://github.com/fedidcg/meetings/blob/main/2024/2024-10-15-notes.md

@tttzach

tttzach commented Oct 15, 2024

Copy link
Copy Markdown
Collaborator Author

@aaronpk @bvandersloot-mozilla @philsmart Please take a look!

Comment thread spec/index.bs
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs
@philsmart

Copy link
Copy Markdown
Contributor

From the perspective of at least the R&E federations I am involved with, 'active' mode is a better fit. This mode supports authentication with Identity Providers (IdPs) that the user has not yet logged into (as signalled by the login status API).

Supporting multiple IdPs in 'active' mode would be helpful, but it could result in the same account fetching issues as enabling multi-IdP in 'passive' mode. The 'passive' mode addressed this (if I recall correctly) by including only the IdPs you've signed into, which brings us back to the same issue (unable to use an IdP you've not logged into). This can be addressed for now by using an external IdP discovery service and populating FedCM with a single IdP in 'active' mode.

For what it's worth, I agree with renaming 'button' and 'widget' to 'active' and 'passive', it is clearer.

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
1. Let |mode| be |options|'s {{IdentityCredentialRequestOptions/mode}}.
1. If |mode| is [=active=]
1. If [=transient activation=] is not present, return (failure, true).
1. If [=transient activation=] is present and there is a pending

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This part about pending request is also not precise enough. Presumably this is also scoped to something (perhaps top-level browsing context?). In addition, you are never going to reach this because we disallow this from credential management in 8.2 https://w3c.github.io/webappsec-credential-management/#algorithm-request so that will need to be modified as well at some point

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch on the scoping... let me know if |W|'s top-level browsing context works or if that should be even more specific. Should modifying 8.2 be in this PR?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No, you cannot modify 8.2 in this PR since that is a separate repo. I also filed an issue because that uses the wrong scope as well. Need to think how to fix it while also allowing the active mode to be prioritized (eg supersede a pending passive mode request)

Comment thread spec/index.bs Outdated
1. If [=transient activation=] is present and there is a pending
request where |mode| is [=passive=], cancel the previous request
as if a {{CredentialRequestOptions/signal}} of
[=AbortSignal/aborted=] was given to it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm but isnt the abort signal only for the developer to use? This does not make sense to me, is this actually what we do?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No we don't actually use the abort signal for this case, but instead we directly reject the previous request. Though this was why its worded this way: #660 (comment)

Maybe we can get rid of as if a {{CredentialRequestOptions/signal}} of [=AbortSignal/aborted=] was given to it.?

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated

@bvandersloot-mozilla bvandersloot-mozilla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why SHOULD?

@hlflanagan

Copy link
Copy Markdown
Contributor

PR further discussed in https://github.com/w3c-fedid/meetings/blob/main/2024/2024-10-22-notes.md
(@bvandersloot-mozilla will review; the issue raised (w3c-fedid/active-mode#6) will be added to the text as a related problem that still needs to be solved)

@tttzach tttzach left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the review, please take another look!

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
1. If [=transient activation=] is present and there is a pending
request where |mode| is [=passive=], cancel the previous request
as if a {{CredentialRequestOptions/signal}} of
[=AbortSignal/aborted=] was given to it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No we don't actually use the abort signal for this case, but instead we directly reject the previous request. Though this was why its worded this way: #660 (comment)

Maybe we can get rid of as if a {{CredentialRequestOptions/signal}} of [=AbortSignal/aborted=] was given to it.?

Comment thread spec/index.bs Outdated
1. Let |mode| be |options|'s {{IdentityCredentialRequestOptions/mode}}.
1. If |mode| is [=active=]
1. If [=transient activation=] is not present, return (failure, true).
1. If [=transient activation=] is present and there is a pending

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch on the scoping... let me know if |W|'s top-level browsing context works or if that should be even more specific. Should modifying 8.2 be in this PR?

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
@tttzach
tttzach requested a review from npm1 October 31, 2024 02:38
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs
Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
@tttzach
tttzach requested a review from npm1 October 31, 2024 22:02

@npm1 npm1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated
cbiesinger added a commit to cbiesinger/WebID that referenced this pull request Nov 4, 2024
@tttzach

tttzach commented Nov 5, 2024

Copy link
Copy Markdown
Collaborator Author

@bvandersloot-mozilla Friendly ping :)

@yi-gu yi-gu added the agenda+ Regular CG meeting agenda items label Nov 6, 2024
@hlflanagan

Copy link
Copy Markdown
Contributor

Note: discussed during https://github.com/fedidcg/meetings/blob/main/2024/2024-11-12-notes.md ; PR blocked pending @bvandersloot-mozilla review.

@npm1
npm1 merged commit e6ce288 into main Nov 18, 2024
@npm1
npm1 deleted the tttzach-patch-1 branch November 18, 2024 17:01
github-actions Bot added a commit that referenced this pull request Nov 18, 2024
SHA: e6ce288
Reason: push, by npm1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@cbiesinger cbiesinger removed the agenda+ Regular CG meeting agenda items label Mar 13, 2025
npm1 pushed a commit that referenced this pull request Jun 17, 2025
* Specify "Use another account".

This depends on PR #660 (Mode API).

Bug: w3c-fedid/active-mode#3

* ted changes

* npm comment

* fix indentation

* fix indentation

* fix nit

* fix indentation

* oxford commas

* single boolean

* otherwise

* Fix review comments

* MUST->SHOULD

Co-authored-by: bvandersloot-mozilla <90582190+bvandersloot-mozilla@users.noreply.github.com>

---------

Co-authored-by: bvandersloot-mozilla <90582190+bvandersloot-mozilla@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

A not-yet logged in IDP has no route to success with this flow

10 participants