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

Function isUserMatching

firebase-vscode/src/cli.ts:42–54  ·  view source on GitHub ↗
(account: Account, options: Options)

Source from the content-addressed store, hash-verified

40
41 // helper to determine if VSCode options has the same account as global default
42 function isUserMatching(account: Account, options: Options) {
43 if (!options.user || !options.tokens) {
44 return false;
45 }
46
47 const optionsUser = options.user as User;
48 const optionsTokens = options.tokens as Tokens;
49 return (
50 account &&
51 account.user?.email === optionsUser.email &&
52 account.tokens.refresh_token === optionsTokens.refresh_token // Should check refresh token which is consistent, not access_token which is short lived.
53 );
54 }
55
56 // only add account options when vscode is missing account information
57 if (!isUserMatching(account!, currentOptions.value)) {

Callers 1

requireAuthWrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…