Cache oauth credentials (#927)

This commit is contained in:
Tommaso Sciortino
2025-06-11 13:26:41 -07:00
committed by GitHub
parent c0580eaf4b
commit 24c61147b8
6 changed files with 87 additions and 16 deletions

View File

@@ -5,12 +5,12 @@
*/
import { ContentGenerator } from '../core/contentGenerator.js';
import { loginWithOauth } from './oauth2.js';
import { getOauthClient } from './oauth2.js';
import { setupUser } from './setup.js';
import { CcpaServer } from './ccpaServer.js';
export async function createCodeAssistContentGenerator(): Promise<ContentGenerator> {
const oauth2Client = await loginWithOauth();
const oauth2Client = await getOauthClient();
const projectId = await setupUser(
oauth2Client,
process.env.GOOGLE_CLOUD_PROJECT,