Skip to content

Commit

Permalink
Merge pull request #3811 from continuedev/nate/all-green
Browse files Browse the repository at this point in the history
fix auth link
  • Loading branch information
sestinj authored Jan 22, 2025
2 parents 92e6b54 + f89a9ab commit 416d2eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}/binary",
"env": {
// "CONTROL_PLANE_ENV": "test",
"CONTINUE_DEVELOPMENT": "true",
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"
}
Expand Down
2 changes: 1 addition & 1 deletion binary/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions core/control-plane/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 416d2eb

Please sign in to comment.