Skip to content

Commit

Permalink
better structure
Browse files Browse the repository at this point in the history
  • Loading branch information
cbiesinger committed Aug 11, 2023
1 parent 0c154cb commit d932e3f
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -364,24 +364,7 @@ Note: Website-initiated cookie changes should not affect this map. When
[=IDP-SignIn-Status=].
RP state should not affect this map since it only reflects IDP state.

IDPs can also use a JavaScript API to update the stored sign-in status:

<pre class="idl">
[Exposed=Window, SecureContext]
partial interface IdentityProvider {
static undefined recordSignIn();
static undefined recordSignOut();
};
</pre>

Issue: Should the functions return Promise<undefined>, so the caller can know
when the call is finished?

When {{IdentityProvider/recordSignIn}} or {{IdentityProvider/recordSignOut}} is
called, the user agent [=map/set|sets=] the entry in the [=IDP Sign-in Status
Map=] with the [=map/key=] being [=/this=]'s [=/relevant settings object=]'s
[=environment settings object/origin=] and the value being [=signed-in=] (for
`recordSignIn`) or [=signed-out=] (for `recordSignOut`).
IDPs can also use a JavaScript API to update the stored sign-in, see {{IdentityProvider}}.

### Interaction with `Clear-Site-Data`

Expand Down Expand Up @@ -1252,13 +1235,27 @@ This specification introduces the {{IdentityUserInfo}} dictionary as well as the
};

[Exposed=Window, SecureContext] interface IdentityProvider {
static undefined recordSignIn();
static undefined recordSignOut();
static Promise&lt;sequence&lt;IdentityUserInfo&gt;&gt; getUserInfo(IdentityProviderConfig config);
};
</pre>

Issue: [Decide](https://github.com/fedidcg/FedCM/issues/476) whether {{IdentityProvider}} is the
correct location for the {{IdentityProvider/getUserInfo()}} method.

Issue: Should the recordSign{In,Out} functions return `Promise<undefined>`, so the caller can know
when the call is finished?

Issue: [Reconcile](https://github.com/speced/bikeshed/issues/2636) how these
record* functions relate to the isLoggedIn API.

When {{IdentityProvider/recordSignIn}} or {{IdentityProvider/recordSignOut}} is
called, the user agent [=map/set|sets=] the entry in the [=IDP Sign-in Status
Map=] with the [=map/key=] being [=/this=]'s [=/relevant settings object=]'s
[=environment settings object/origin=] and the value being [=signed-in=] (for
`recordSignIn`) or [=signed-out=] (for `recordSignOut`).

An {{IdentityUserInfo}} represents user account information from a user. This information is exposed
to the [=IDP=] once the user has already used the FedCM API to login in the [=RP=]. That is, it is
exposed when there exists an account |account| such that the [=connected accounts set=] [=list/contains=]
Expand Down

0 comments on commit d932e3f

Please sign in to comment.