Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to get the callback/redirect to the specific extension in embedded code server? #6583

Unanswered
MurrayC7 asked this question in Q&A
Discussion options

Generally in local VSCode, I know an extension whose login process is like:

  1. starting with a click on the login button
  2. 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
  3. the extension starts to wait for login state/token, etc.
  4. some authentication process in the browser
  5. redirection back to vscode with the special uri, e.g., vscode://{extension_name}&state=xxx
  6. 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!

You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

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).

You must be logged in to vote
2 replies
Comment options

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.

Comment options

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.

Comment options

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

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /