fix(a2a-server): prioritize ADC before evaluating headless constraints for auth initialization (#23614)

This commit is contained in:
Spencer
2026-03-30 08:26:15 -04:00
committed by GitHub
parent d9d2ce36f2
commit a255529c6b
3 changed files with 80 additions and 195 deletions

View File

@@ -119,7 +119,8 @@ async function initOauthClient(
credentials &&
typeof credentials === 'object' &&
'type' in credentials &&
credentials.type === 'external_account_authorized_user'
(credentials.type === 'external_account_authorized_user' ||
credentials.type === 'service_account')
) {
const auth = new GoogleAuth({
scopes: OAUTH_SCOPE,
@@ -130,7 +131,7 @@ async function initOauthClient(
});
const token = await byoidClient.getAccessToken();
if (token) {
debugLogger.debug('Created BYOID auth client.');
debugLogger.debug(`Created ${credentials.type} auth client.`);
return byoidClient;
}
}