code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Feat]: Get the external auth callback/redirect to the specific extension in embedded code server?

Open MurrayC7 opened this issue 1 year ago • 0 comments

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!

What is your suggestion?

Why do you want this feature?

Are there any workarounds to get this functionality today?

Are you interested in submitting a PR for this?

MurrayC7 avatar Dec 13 '23 09:12 MurrayC7