Interfaces
WellknownIdApi
window.WellknownId, once the script has run.
Methods
linkKey()
linkKey(): Promise<LoginResult>;
Links another wellknown.id to the account the page is signed in to (prd.md §4.9): a second sign-in in a popup, in
which the holder picks the other one. Call it from a click. Resolves the other sign-in's result, whose sub your
site links to the current account; nothing changes at wellknown.id. Also emitted as wellknown-id-link-success.
Returns
Promise<LoginResult>
WellknownIdEvents
The events the script dispatches on window, and their detail.
Properties
| Property | Type |
|---|---|
wellknown-id-link-success | CustomEvent<LoginResult> |
wellknown-id-login-failure | CustomEvent<LoginFailure> |
wellknown-id-login-success | CustomEvent<LoginResult> |
Type Aliases
LoginFailure
type LoginFailure = object;
The detail of wellknown-id-login-failure: how it was trying, and why it ended (a message starting try_again asks for another click).
Properties
LoginResult
type LoginResult = object;
How a sign-in ended well: the detail of wellknown-id-login-success, and what linkKey() resolves.
Properties
ScriptParams
type ScriptParams = object;
What the script's URL takes, as query parameters: clientId (your domain; this page's hostname by default), mode
(default, fedcm, popup, popin, navigate), redirectUri (this page by default), backend (your endpoint
that redeems codes, on this origin), selfIssued (1: take self-issued tokens yourself, where your config allows
them), and target (the id of an element to put the button in). The element takes mode and client-id as
attributes, over the script's.