signInWithAppPassword
Sign in as who (a handle or DID) with an app password (#5rew5a3c), keeping the sign-in in
store if one's given: no browser, for a server or CI. It signs in again by itself when its tokens can't be
refreshed.
import { appPasswordSession, keptSession } from "#codebase/tcmts/atproto"; import type { Session, SessionStore } from "#codebase/tcmts/atproto"; export async function signInWithAppPassword( who: string, password: string, o: { store?: SessionStore } = {}, ): Promise<Session> { const s = await appPasswordSession(who, password); o.store?.keep(s.did, s); return keptSession(s, o.store); }
uses
- tcmts.atproto.Session
- tcmts.atproto.SessionStore
- tcmts.atproto.appPasswordSession
- tcmts.atproto.keptSession