From 8a128d8dc6c1c5d7aea7004e0efa9fd175be36e5 Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Thu, 10 Jul 2025 18:59:02 -0700 Subject: Add NO_BROWSER environment variable to trigger offline oauth flow (#3713) --- packages/core/src/code_assist/codeAssist.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/core/src/code_assist/codeAssist.ts') diff --git a/packages/core/src/code_assist/codeAssist.ts b/packages/core/src/code_assist/codeAssist.ts index 5f3f843e..23dfe403 100644 --- a/packages/core/src/code_assist/codeAssist.ts +++ b/packages/core/src/code_assist/codeAssist.ts @@ -8,17 +8,19 @@ import { AuthType, ContentGenerator } from '../core/contentGenerator.js'; import { getOauthClient } from './oauth2.js'; import { setupUser } from './setup.js'; import { CodeAssistServer, HttpOptions } from './server.js'; +import { Config } from '../config/config.js'; export async function createCodeAssistContentGenerator( httpOptions: HttpOptions, authType: AuthType, + config: Config, sessionId?: string, ): Promise { if ( authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.CLOUD_SHELL ) { - const authClient = await getOauthClient(authType); + const authClient = await getOauthClient(authType, config); const projectId = await setupUser(authClient); return new CodeAssistServer(authClient, projectId, httpOptions, sessionId); } -- cgit v1.2.3