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

Allow user agent to wait or reject the request before any fetch #676

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,6 @@ algorithm is invoked, the user agent MUST execute the following steps. This retu


Issue: Support choosing accounts from multiple [=IDP=]s, as described [here](https://github.com/fedidcg/FedCM/issues/319).
1. The user agent can decide when to continue with the next steps.

Note: For example, user agents may show an identity provider selector before making
network requests, or provide a button in the URL bar and wait for user input
before continuing.
1. Let |provider| be |options|["{{CredentialRequestOptions/identity}}"]["{{IdentityCredentialRequestOptions/providers}}"][0].
1. Let |credential| be the result of running [=create an IdentityCredential=] with |provider|,
|options|, and |globalObject|.
Expand Down Expand Up @@ -775,6 +770,19 @@ To <dfn>create an IdentityCredential</dfn> given an {{IdentityProviderRequestOpt
or a pair (failure, bool), where the bool indicates whether to skip delaying
the exception thrown.
1. Assert: These steps are running [=in parallel=].
1. The user agent MAY wait an arbitrary amount of time before continuing with the
next steps. The user agent MAY also return (failure, false) at this point or
after some arbitrary wait.

<div class="note">
NOTE: For example, the user agent could:
npm1 marked this conversation as resolved.
Show resolved Hide resolved
* Show an identity provider selector and only proceed once
the user confirms their desire to use an identity provider.
* Provide a button in the URL bar and wait for user input
before continuing.
* Use previous user behavior to determine not to show any
UI to the user and silently reject the request.
</div>
1. Let |loginStatus| be the result of [=get the login status=] with
the [=/origin=] of |provider|'s {{IdentityProviderConfig/configURL}}.
1. If |loginStatus| is [=unknown=], a user agent MAY set it to [=logged-out=].
Expand Down
Loading