MCPcopy Create free account
hub / github.com/firebase/firebase-tools / getGlobalDefaultAccount

Function getGlobalDefaultAccount

src/auth.ts:48–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 * this was the only account.
47 */
48export function getGlobalDefaultAccount(): Account | undefined {
49 const user = configstore.get("user") as User | undefined;
50 const tokens = configstore.get("tokens") as Tokens | undefined;
51
52 // TODO: Is there ever a case where only User or Tokens is defined
53 // and we want to accept that?
54 if (!user || !tokens) {
55 return undefined;
56 }
57
58 return {
59 user,
60 tokens,
61 };
62}
63
64/**
65 * Get the default account associated with a project directory, or the global default.

Callers 11

auth.spec.tsFile · 0.90
isDebugModeFunction · 0.90
actuateWithInfoFunction · 0.90
logoutActionFunction · 0.90
logout.tsFile · 0.90
requireAuthWrapperFunction · 0.90
getProjectDefaultAccountFunction · 0.85
getAllAccountsFunction · 0.85
deleteAccountFunction · 0.85
updateAccountFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…