Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert requiredCredentials change
  • Loading branch information
Theodore Li committed Apr 6, 2026
commit 0a29cbe865dbecbd7c8b6c76d7772ba1aadaed6b
Original file line number Diff line number Diff line change
Expand Up @@ -338,23 +338,25 @@ function transformBlockMetadata(metadata: CopilotBlockMetadata): any {
transformed.authType = metadata.authType

if (metadata.authType === 'OAuth') {
// Resolve the actual OAuth service ID from the oauth-input subblock
const oauthSubBlock = metadata.inputSchema?.find(
(sb: CopilotSubblockMetadata) => sb.type === 'oauth-input' && sb.serviceId
)
const serviceId = oauthSubBlock?.serviceId ?? metadata.id

transformed.requiredCredentials = {
type: 'oauth',
service: serviceId,
service: metadata.id, // e.g., 'gmail', 'slack', etc.
description: `OAuth authentication required for ${metadata.name}`,
}

// Check if this service also supports service account credentials
const serviceAccountProviderId = getServiceAccountProviderForProviderId(serviceId)
if (serviceAccountProviderId) {
transformed.requiredCredentials.serviceAccountType = serviceAccountProviderId
transformed.requiredCredentials.description = `OAuth or service account authentication supported for ${metadata.name}`
const oauthSubBlock = metadata.inputSchema?.find(
(sb: CopilotSubblockMetadata) => sb.type === 'oauth-input' && sb.serviceId
)
if (oauthSubBlock?.serviceId) {
const serviceAccountProviderId = getServiceAccountProviderForProviderId(
oauthSubBlock.serviceId
)
if (serviceAccountProviderId) {
transformed.requiredCredentials.serviceAccountType = serviceAccountProviderId
transformed.requiredCredentials.description =
`OAuth or service account authentication supported for ${metadata.name}`
}
}
} else if (metadata.authType === 'API Key') {
transformed.requiredCredentials = {
Expand Down
Loading