Skip to content

auth.login

Logs in to a provider with pi’s OAuth flow, run by the daemon; the flow (the URL to open, progress, a code to paste) goes to the calling window as login_* window requests (PRT-130, PRT-131).

/** `auth.login` and `auth.logout` params: the provider's pi id (PRT-130, PRT-133). */
export type ProviderRef = {
providerId: string;
};
/** `auth.login` result (PRT-130): omfp stored the provider's credential. */
export type LoggedIn = {
/** The provider's name, as `auth.providers` gives it. */
name: string;
providerId: string;
};