File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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 } ` )
You can’t perform that action at this time.
0 commit comments