Skip to content
mercury framework
GitHub

PersonLogin

PersonLogin = object

Defined in: types/plugin-types/index.ts:244

How a plugin acting as person logs one in, for a person who isn’t at the service’s machine: start begins the login for personKey (a user key) with the link back to Mercury that the provider redirects to, and returns the link the person opens and the state the provider sends back with the code; complete finishes it with that code. The core keeps which person a state belongs to, so complete only ever runs for the person who started.

complete: (personKey, code, state) => Promise<{ ok: true; } | { error: string; ok: false; }>

Defined in: types/plugin-types/index.ts:249

string

string

string

Promise<{ ok: true; } | { error: string; ok: false; }>


start: (personKey, callbackUrl) => Promise<{ authorizeUrl: string; ok: true; state: string; } | { error: string; ok: false; }>

Defined in: types/plugin-types/index.ts:245

string

string

Promise<{ authorizeUrl: string; ok: true; state: string; } | { error: string; ok: false; }>