vscode-pull-request-github: API: Cannot sign in with VSCodium URI

Hello, I use Codium. The sign in/authentication API prevents me from signing in with Codium’s URI, contrary to VS Code’s URI. I’ve already authenticated the plugin with my account here. The API doesn’t like the vscodium:// URI, contrary to the vscode:// URI, as shown in this GIF:

vysCCNF8Cp

The API will let me through with the vscode:// API with an 801 code (I don’t have VS Code installed), and it forbids me if I use the vscodium:// URI with Forbidden.

I got to this page from the GitHub Pull Requests: Sign In command - it redirected me here from this editor. This is the link to authenticate, with state and windowId redacted:

https://vscode-auth.github.com/authorize/?callbackUri=vscodium://github.vscode-pull-request-github/did-authenticate%253F...&scope=read:user%20user:email%20repo%20write:discussion&responseType=code&authServer=https://github.com/

The callback URI differs:

+ ✔️ (-> 801)       ?callbackUri=vscode://github.vscode-pull-request-github/did-authenticate
- ❌ (-> Forbidden) ?callbackUri=vscodium://github.vscode-pull-request-github/did-authenticate

If it helps, I’m using Codium as a portable binary, and I opened the link with it running in the background. (Also, this shouldn’t have anything to do with my container tabs.)


Extension version: 0.15.0 VS Code version: VSCodium 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-18T10:22:21.470Z) - portable binary OS version: Windows_NT x64 10.0.18362 Process Argv: --enable-proposed-api GitHub.vscode-pull-request-github

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 10
  • Comments: 26 (3 by maintainers)

Most upvoted comments

I changed the link:

https://vscode-auth.github.com/authorize/?callbackUri=vscodium://github.vscode-pull-request-github/did-authenticate%[other parts]

to

https://vscode-auth.github.com/authorize/?callbackUri=vscode://github.vscode-pull-request-github/did-authenticate%[other parts]

(The callback part from vscodium to vscode) then a get the link for when you are not redirected:

vscode://vscode.github-authentication/did-authenticate?[other parts]

and change the vscode part again to vscodium:

vscodium://vscode.github-authentication/did-authenticate?[other parts]

then I past it in the browser and it works. 😃

Sorry for my english. Its a work in progress. Feel free to correct me.

This extension doesn’t officially support anything other than VS Code.

I figured out how to workaround this issue.

  1. Go to your user settings on github.com, then go into Developer > Personal access tokens.
  2. Click “generate new token”.
  3. Call the token whatever you want, like “VS Codium GitHub Pull Requests plugin token”.
  4. Scroll down and check the following boxes: image
  • user:email
  • user:follow
  • write:discussion
  1. Click generate token.
  2. Copy the token ID when you’re told to, and keep it in your clipboard. Like it says, you won’t be able to find it again.
  3. Enter VS Codium with the plugin installed. Click the “Sign in” button located on the bottom status bar. If a dialogue opens to redirect you to a website, hit cancel. Then click the sign in button again. A “Token” text field should appear.
  4. Paste your token into that text field, and press enter. Then for the host, type github.com.
  5. It should authenticate you into the plugin.

This is more of a temporary workaround while the frontend for doing this through the website won’t work.

@alexr00

This extension doesn’t officially support anything other than VS Code.

VSCodium is the Open Source version of Visual Studio Code with slightly differing build instructions. It is NOT:

  1. a patchset
  2. a fork
  3. a different project

Microsoft says they love open source. Are they also willing to back it up by allowing the open source version (which is officially maintained by Microsoft), community-driven binary releases of it (f.e. code, available from all kinds of official FOSS software repositories) and VSCodium (a precompiled, binary build of MICROSOFTS OSS Visual Studio Code) to also have access to official integrations, such as the one with GitHub? I think it is unreasonable to treat anything that isn’t Microsofts branded proprietary release from their homepage as unsupported.

As a side note, I don’t think this is an issue with this extension, but with GitHub not allowing other types of editors to request PAT tokens. Try opening an issue there instead.

This extension doesn’t officially support anything other than VS Code.

If you are not for it, it doesn’t hurt to not be against it.

After trying your solution this is the response i get from GitHub Authentication Provider: “The input did not matched the expected format”.

VSCodium version: 1.45.0 GitHub PullRequests version: 0.16.0

I switch from kali to parrot, then vscodium is pre-installed in it. I cannot even open account option to sign in. Then uninstalled vscodium and installed visual studio code by

sudo apt purge vscode sudo apt purge vscodium sudo apt purge codium

I installed VSC in .deb format and installed using

sudo apt install ./filename.deb

It is now working!!!

I can also confirm this problem as reported by @7automaton and mentioned by @marcorichetta in this issue.

My environment:

  • OS: RHEL 8.2 (Gnome 3.32.2 in Xorg mode with Linux kernel 4.18.0)
  • Architecture: x86_64
  • VSCodium version: 1.45.0 (no Github extensions, just vanilla git support)

This is a jarring UX problem. How can we help fix it?

I also have this problem, is there some way to enter the token manually in a config file or settings? If not, how can I configure the git command to use a token for all https requests to github?

Hi, a bit late but maybe someone here can help. I tried the personal access token solution (it does not give the option to authorize in the website) and nothing happens… It opens the prompt to write the token, I do, and then nothing, not error message or anything, just nothing. Anybody know where I can figure out what’s wrong?

vscode://vscode.github-authentication/did-authenticate?[other parts]

and change the vscode part again to vscodium:

vscodium://vscode.github-authentication/did-authenticate?[other parts]

Callback url dint work on brave worked with firefox

I changed the link:

[https://vscode-auth.github.com/authorize/?callbackUri=vscodium://github.vscode-pull-request-github/did-authenticate%[other](https://vscode-auth.github.com/authorize/?callbackUri=vscodium://github.vscode-pull-request-github/did-authenticate%[other) parts]

to

[https://vscode-auth.github.com/authorize/?callbackUri=vscode://github.vscode-pull-request-github/did-authenticate%[other](https://vscode-auth.github.com/authorize/?callbackUri=vscode://github.vscode-pull-request-github/did-authenticate%[other) parts]

(The callback part from vscodium to vscode) then a get the link for when you are not redirected:

vscode://vscode.github-authentication/did-authenticate?[other parts]

and change the vscode part again to vscodium:

vscodium://vscode.github-authentication/did-authenticate?[other parts]

then I past it in the browser and it works. 😃

Sorry for my english. Its a work in progress. Feel free to correct me.

Thanks! This worked for me

@marcorichetta over in this issue provided a graphical step-by-step walkthrough of the workaround, and it worked for me. I suspect @DanielCostaCarvalho was describing a similar process, sorry but I just wasn’t able to understand the text of their description.

Anyway, I hope this issue can be solved more systematically so that this hacky workaround wouldn’t be necessary.

@DanielCostaCarvalho that worked but I had to use a browser session where I was not logged in to Github already.