From f89a9abecee54224a2e305f79a57ab6b4bfdf335 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 21 Jan 2025 14:57:25 -0800 Subject: [PATCH] fix auth link --- .vscode/launch.json | 1 + binary/package-lock.json | 2 +- core/control-plane/auth/index.ts | 5 +---- .../continueintellijextension/auth/ContinueAuthService.kt | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index cdb502c8c1..7a51617297 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -38,6 +38,7 @@ "internalConsoleOptions": "openOnSessionStart", "cwd": "${workspaceFolder}/binary", "env": { + // "CONTROL_PLANE_ENV": "test", "CONTINUE_DEVELOPMENT": "true", "CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug" } diff --git a/binary/package-lock.json b/binary/package-lock.json index 89ecc53cc7..316fddcd2f 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -48,7 +48,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.10", + "@continuedev/config-yaml": "^1.0.16", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/core/control-plane/auth/index.ts b/core/control-plane/auth/index.ts index c1a6f881db..f7d423f83b 100644 --- a/core/control-plane/auth/index.ts +++ b/core/control-plane/auth/index.ts @@ -2,14 +2,11 @@ import { v4 as uuidv4 } from "uuid"; import { controlPlaneEnv } from "../env"; -const CLIENT_ID = "client_01J0FW6XN8N2XJAECF7NE0Y65J"; -// const CLIENT_ID = "client_01J0FW6XCPMJMQ3CG51RB4HBZQ"; // Staging - export async function getAuthUrlForTokenPage(): Promise { const url = new URL("https://api.workos.com/user_management/authorize"); const params = { response_type: "code", - client_id: CLIENT_ID, + client_id: controlPlaneEnv.WORKOS_CLIENT_ID, redirect_uri: `${controlPlaneEnv.APP_URL}tokens/callback`, // redirect_uri: "http://localhost:3000/tokens/callback", state: uuidv4(), diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt index 22178004e5..d23308cf1d 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt @@ -135,7 +135,7 @@ class ContinueAuthService { private fun openSignInPage(project: Project) { val coreMessenger = project.service().coreMessenger coreMessenger?.request("auth/getAuthUrl", null, null) { response -> - val authUrl = (response as? Map<*, *>)?.get("url") as? String + val authUrl = ((response as? Map<*, *>)?.get("content") as? Map<*, *>)?.get("url") as? String if (authUrl != null) { // Open the auth URL in the browser Desktop.getDesktop().browse(java.net.URI(authUrl))