Create BYOID auth client when detecting BYOID credentials (#11592)

This commit is contained in:
cocosheng-g
2025-10-27 16:05:11 -04:00
committed by GitHub
parent 44c62c8e5d
commit 9e8f7c074c
4 changed files with 112 additions and 42 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import type {
} from './types.js';
import { UserTierId } from './types.js';
import { CodeAssistServer } from './server.js';
import type { OAuth2Client } from 'google-auth-library';
import type { AuthClient } from 'google-auth-library';
export class ProjectIdRequiredError extends Error {
constructor() {
@@ -32,7 +32,7 @@ export interface UserData {
* @param projectId the user's project id, if any
* @returns the user's actual project id
*/
export async function setupUser(client: OAuth2Client): Promise<UserData> {
export async function setupUser(client: AuthClient): Promise<UserData> {
const projectId =
process.env['GOOGLE_CLOUD_PROJECT'] ||
process.env['GOOGLE_CLOUD_PROJECT_ID'] ||