MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getOauthClient

Function getOauthClient

packages/core/src/code_assist/oauth2.ts:193–201  ·  view source on GitHub ↗
(
  authType: AuthType,
  config: Config,
)

Source from the content-addressed store, hash-verified

191}
192
193export async function getOauthClient(
194 authType: AuthType,
195 config: Config,
196): Promise<OAuth2Client> {
197 if (!oauthClientPromises.has(authType)) {
198 oauthClientPromises.set(authType, initOauthClient(authType, config));
199 }
200 return oauthClientPromises.get(authType)!;
201}
202
203async function authWithUserCode(client: OAuth2Client): Promise<boolean> {
204 const redirectUri = 'https://codeassist.google.com/authcode';

Callers 3

oauth2.test.tsFile · 0.85
mainFunction · 0.85

Calls 3

initOauthClientFunction · 0.85
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected