-
Notifications
You must be signed in to change notification settings - Fork 6.3k
-
Generally in local VSCode, I know an extension whose login process is like:
- starting with a click on the login button
- vscode asks to open the external website with url, e.g., https://auth.xxx.xxx/xxx/auth?{params}&redirect_uri=vscode://{extension_name}&state=xxx
- the extension starts to wait for login state/token, etc.
- some authentication process in the browser
- redirection back to vscode with the special uri, e.g., vscode://{extension_name}&state=xxx
- login success.
However, in the case of embedded code server, I got stuck in step 5.
The only clue I found is as Failed to launch 'code-oss://{extension_name}?{params}' because the scheme does not have a registered handler
in browser DevTool. I consider code-oss
as the schema on the Linux server instead of Windows, right?
Anyway I can do to solve this login issue?
The code server url is like http://xxx:8889/?folder=/data/workspace
. Does simple URL schema change work?
Otherwise, do I need to develop REST APIs? or just use some forward/proxy methods?
Code-server Version:
4.19.1
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 2 replies
-
If you are able to get the link it is trying to open I think you can go back to code-server, use "open url" from the command palette, then paste in the link. At least, I have used this for the Figma extension and it worked there.
We should probably try registering the code-oss
link on the client system so code-server can handle it automatically (#1571).
Beta Was this translation helpful? Give feedback.
All reactions
-
I think it might also work if the extension is modified to use asExternalUri
for the redirect URL. Or maybe this is something we can do from the code-server side and we give them the external URI to begin with.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you for the suggestion! I will try the open url
workaround, as well as the methods mentioned in the Register Handler
topic. Looking forward to the update for native support.
Beta Was this translation helpful? Give feedback.
All reactions
-
The Answer to this is to open up the command pallet and use the open url command that @code-asher suggested above. Then put your code-oss link in and open it.
If you press CTRL+P as a shortcut remember that you need to put a > first and then type open url to search for the command
Beta Was this translation helpful? Give feedback.