Use Env Var directly instead of through GoogleAuth() (#1202)

This commit is contained in:
Tommaso Sciortino
2025-06-18 17:24:46 -07:00
committed by GitHub
parent 8bc3b415c9
commit b49d55584e
4 changed files with 18 additions and 19 deletions

View File

@@ -6,14 +6,14 @@
import { ClientMetadata, OnboardUserRequest } from './types.js';
import { CodeAssistServer } from './server.js';
import { AuthClient } from 'google-auth-library';
import { OAuth2Client } from 'google-auth-library';
/**
*
* @param projectId the user's project id, if any
* @returns the user's actual project id
*/
export async function setupUser(authClient: AuthClient): Promise<string> {
export async function setupUser(authClient: OAuth2Client): Promise<string> {
const projectId = process.env.GOOGLE_CLOUD_PROJECT;
const caServer = new CodeAssistServer(authClient, projectId);