fix: use provider name in authorization prompt

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-08-21 06:03:21 +00:00
1 parent 6e36016a00
commit 8fe0575f61
1 file changed
+2 -1
+2 -1
View File
@@ -7242,6 +7242,7 @@ export function toolAccessService(db: Db, options: ToolAccessServiceOptions = {}
if (connection.status === "archived") throw conflict("Archived app connections cannot start sign in");
const sourceTemplateKey = typeof connection.config.sourceTemplateKey === "string" ? connection.config.sourceTemplateKey : null;
const galleryEntry = sourceTemplateKey ? getConnectableAppDefinition(sourceTemplateKey) : null;
const authorizationProviderName = galleryEntry?.name ?? connection.name;
assertOAuthRedirectConstraints(galleryEntry, input.redirectUri);
const endpoints = await oauthEndpointsForConnection(connection, null, input.redirectUri);
if (endpoints.grantType === "client_credentials") {
@@ -7350,7 +7351,7 @@ export function toolAccessService(db: Db, options: ToolAccessServiceOptions = {}
addresseeUserId: input.subjectUserId,
idempotencyKey,
sourceRunId: binding.actorType === "agent" ? input.actor.sessionId ?? null : null,
title: `Connect your ${connection.name} to continue`,
title: `Connect your ${authorizationProviderName} to continue`,
summary: `Connect ${connection.name} to continue`,
createdByAgentId: binding.actorType === "agent" ? binding.actorId : null,
payload,