Skip to content

Commit b0821b3

Browse files
authored
Pass editor deeplink URI to app.roocode.com (#4120)
1 parent 8de608a commit b0821b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/cloud/src/AuthService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ export class AuthService extends EventEmitter<AuthServiceEvents> {
9393
// Generate a cryptographically random state parameter.
9494
const state = crypto.randomBytes(16).toString("hex")
9595
await this.context.globalState.update(AUTH_STATE_KEY, state)
96-
const uri = vscode.Uri.parse(`${getRooCodeApiUrl()}/extension/sign-in?state=${state}`)
97-
await vscode.env.openExternal(uri)
96+
const params = new URLSearchParams({ state, uri_scheme: vscode.env.uriScheme })
97+
const url = `${getRooCodeApiUrl()}/extension/sign-in?${params.toString()}`
98+
await vscode.env.openExternal(vscode.Uri.parse(url))
9899
} catch (error) {
99100
console.error(`[auth] Error initiating Roo Code Cloud auth: ${error}`)
100101
throw new Error(`Failed to initiate Roo Code Cloud authentication: ${error}`)

0 commit comments

Comments
 (0)