From dcf6ab8587563b0fc0d5d39310f044cddc920266 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Wed, 20 Aug 2025 21:13:14 +0000 Subject: [PATCH 1/2] server: add Kiro editor OAuth client support Add kiro-gitpod OAuth client to enable Kiro editor integration with Gitpod workspaces. Co-authored-by: Ona --- components/server/src/oauth-server/db.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/components/server/src/oauth-server/db.ts b/components/server/src/oauth-server/db.ts index 1ac3329eb06527..cd091d1a9893cb 100644 --- a/components/server/src/oauth-server/db.ts +++ b/components/server/src/oauth-server/db.ts @@ -167,6 +167,26 @@ const vscodeInsiders = createVSCodeClient("vscode-insiders", "VS Code Insiders") const vscodium = createVSCodeClient("vscodium", "VSCodium"); const cursor = createVSCodeClient("cursor", "Cursor"); +const kiroClient: OAuthClient = { + id: "kiro-gitpod", + secret: "kiro-gitpod-secret", + name: "Kiro Editor: Gitpod extension", + redirectUris: ["kiro://gitpod.extension/complete-gitpod-auth"], + allowedGrants: ["authorization_code"], + scopes: [ + { name: "function:getGitpodTokenScopes" }, + { name: "function:getLoggedInUser" }, + { name: "function:getWorkspace" }, + { name: "function:getWorkspaces" }, + { name: "function:getOwnerToken" }, + { name: "function:startWorkspace" }, + { name: "function:stopWorkspace" }, + { name: "function:deleteWorkspace" }, + { name: "function:listenForWorkspaceInstanceUpdates" }, + { name: "resource:default" }, + ], +}; + export const inMemoryDatabase: InMemory = { clients: { [localClient.id]: localClient, @@ -178,6 +198,7 @@ export const inMemoryDatabase: InMemory = { [cursor.id]: cursor, [desktopClient.id]: desktopClient, [toolbox.id]: toolbox, + [kiroClient.id]: kiroClient, }, tokens: {}, scopes: {}, From 9fe51f596e739230f1201d3c44bae2a1aa7846e1 Mon Sep 17 00:00:00 2001 From: Kyle Brennan Date: Wed, 20 Aug 2025 21:42:48 +0000 Subject: [PATCH 2/2] server: simplify Kiro OAuth client to match VS Code pattern Use createVSCodeClient helper function instead of custom configuration to maintain consistency with other editor integrations. Co-authored-by: Ona --- components/server/src/oauth-server/db.ts | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/components/server/src/oauth-server/db.ts b/components/server/src/oauth-server/db.ts index cd091d1a9893cb..a6afce705d4a80 100644 --- a/components/server/src/oauth-server/db.ts +++ b/components/server/src/oauth-server/db.ts @@ -166,26 +166,7 @@ const vscodeInsiders = createVSCodeClient("vscode-insiders", "VS Code Insiders") const vscodium = createVSCodeClient("vscodium", "VSCodium"); const cursor = createVSCodeClient("cursor", "Cursor"); - -const kiroClient: OAuthClient = { - id: "kiro-gitpod", - secret: "kiro-gitpod-secret", - name: "Kiro Editor: Gitpod extension", - redirectUris: ["kiro://gitpod.extension/complete-gitpod-auth"], - allowedGrants: ["authorization_code"], - scopes: [ - { name: "function:getGitpodTokenScopes" }, - { name: "function:getLoggedInUser" }, - { name: "function:getWorkspace" }, - { name: "function:getWorkspaces" }, - { name: "function:getOwnerToken" }, - { name: "function:startWorkspace" }, - { name: "function:stopWorkspace" }, - { name: "function:deleteWorkspace" }, - { name: "function:listenForWorkspaceInstanceUpdates" }, - { name: "resource:default" }, - ], -}; +const kiro = createVSCodeClient("kiro", "Kiro"); export const inMemoryDatabase: InMemory = { clients: { @@ -198,7 +179,7 @@ export const inMemoryDatabase: InMemory = { [cursor.id]: cursor, [desktopClient.id]: desktopClient, [toolbox.id]: toolbox, - [kiroClient.id]: kiroClient, + [kiro.id]: kiro, }, tokens: {}, scopes: {},