Skip to content

Commit

Permalink
Add IdentityProvider.close() to the explainer (w3c-fedid#486)
Browse files Browse the repository at this point in the history
* Add IdentityProvider.close() to the explainer

* address comments
  • Loading branch information
cbiesinger authored Jul 10, 2023
1 parent 32217b4 commit ba6292b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions proposals/idp-sign-in-status-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,28 @@ was the last/only account getting signed out.

### JS API

And IdP can alternatively call the IdP Sign-in Status API via JS calls through the static functions `IdentityProvider.login()` and `IdentityProvider.logout()`.
An IdP can alternatively call the IdP Sign-in Status API via JS calls through
the static functions `IdentityProvider.login()` and
`IdentityProvider.logout()`. These are to be called from the IDP's origin, and
marks the current origin as signed in or signed out.

```
[Exposed=Window]
interface IdentityProvider {
static void login();
static void logout();
static void close();
}
```

To be called from the IDP's origin, and marks the current origin as signed in or signed out.

In addition, a `close()` function is provided to signal to the browser that the
signin flow is finished. The reason for this function in addition to the header
is that even when the user is already logged in, the signin flow may not be
finished yet; for example, an IDP may want to prompt the user to verify their
phone number. To allow for such flows, the IDP must call
`IdentityProvider.close()` when the flow is fully done.

### Config file addition

Expand Down

0 comments on commit ba6292b

Please sign in to comment.