vscode-extension-tester
vscode-extension-tester copied to clipboard
[🚀 Request] How to provide vscode-style authentication via API
Expected Behavior
- Some programmatic way to send vscode://url to the instance of VSBrowser
Actual Behavior
- None found
Steps to Reproduce the Problem
Manual steps are:
- VS code creates an URL to the web server
- User logs in on the web server and is provided with token from oauth server
- Token is returned as vscode://url (vs code's personal app protocol) that is pushed into browser, thus redirecting the call to vs code application
- User confirms to pass the URL to VS code and then confirms receiving the URL inside VS code instance - authentication is successful.
How I planned to solve the issue:
- Get vscode://url string from oauth server - OK
- Request vscode://url by any means - NO SOLUTION FOUND
- Wait for notification inside VS Code browser to accept that url - PENDING, but should be trivial
I tried several different ways:
- created python script that runs vscode://url. But in my case it starts a new instance of VS Code instead of transferring the URL to Extension host instance.
- inside "it" test called await driver.get('vscode://url') - nothing happens
- installed matching chromium version and running the same driver.get('vscode://url') from it - it starts new instance of Browser, thus ending my test.
Specifications
- VSCode version: 1.71.2
- ExTester version: 4.4.1
- Platform:
- [ x ] Linux
- [ x ] Windows
Currently I can work around this by using CLI command to start VS Code with added " --open-url -- "vscode://url" " arguments.