fix auth link

This commit is contained in:
Nate 2025-01-21 14:57:25 -08:00
parent cdf7b01768
commit f89a9abece
4 changed files with 4 additions and 6 deletions

1
.vscode/launch.json vendored
View file

@ -38,6 +38,7 @@
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}/binary",
"env": {
// "CONTROL_PLANE_ENV": "test",
"CONTINUE_DEVELOPMENT": "true",
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"
}

View file

@ -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",

View file

@ -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<string> {
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(),

View file

@ -135,7 +135,7 @@ class ContinueAuthService {
private fun openSignInPage(project: Project) {
val coreMessenger = project.service<ContinuePluginService>().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))