forget
uses localStorage
Forget a sign-in in this browser (and on the app's server, if it told it), and say so.
import { ACCOUNT_EVENT, endSignIn, SIGNED_IN } from "#codebase/tcmts/atproto"; import type { Account, SignInOptions } from "#codebase/tcmts/atproto"; export async function forget(kept: Account & SignInOptions): Promise<void> { localStorage.removeItem(SIGNED_IN); if (kept.server) await endSignIn().catch(() => undefined); window.dispatchEvent(new Event(ACCOUNT_EVENT)); }
uses
- tcmts.atproto.ACCOUNT_EVENT
- tcmts.atproto.Account
- tcmts.atproto.SIGNED_IN
- tcmts.atproto.SignInOptions
- tcmts.atproto.endSignIn