New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub login redirect fails due to missing subpath #4107
Comments
I'm using code-server under reverse proxy, which is handled by Nginx, My config is:
|
After investigation, I found that it was the authentication URL which lead to the failing: https://xxx.com/callback?vscode-requestId=...... It suppose to be: https://xxx.com/code-server/callback?vscode-requestId=...... Is there any workaroud to deal with such situation? I've tried some but failed. |
For whatever reason, I can't seem to find the "Sign in with GitHub" from GitLens. If it's the authentication URL, you should be able to modify it manually: see #1883 (comment) Let me know if that works! |
Thanks for the screenshots! So I clicked on that, it asked for a PAT, I copied one from https://github.com/settings/tokens and it worked? Can you try that approach instead of the auth URL callback? |
Wow, it works for me! Thx very much. If only callback also works, it'd be perfect. |
I'll let @code-asher chime in and see if he is able to reproduce the issue with the callback |
waiting for good news 😄 |
Ah yup there is a bug where the redirect URL does not include the
sub-path. It should be a simple fix but I have not had the chance to
look into it.
|
No worries! I've changed the title to reflect so and added to On Deck. @Nick-Hopps can't tell you when we'll get to it, but it's on the list and will be in an upcoming milestone in the future! |
It's ok and thx again. |
I am using such an approach, but it asks me for the token each time I do I do have a reverse proxy, too. I replace the corresponding part of the URL, but it doesn't help, exactly like in the case of @Nick-Hopps. |
Usually when this happens, I think it means git isn't caching your credentials. Have you tried this? |
Thanks, it worked. My bad, didn't check this, just thought it's an issue with the code-server. 🤦🏻 |
Happens to all of us once in a while! Glad that's resolved :) |
Hello, If I can be pointed in the right direction. I don't mind doing the work to fix this bug since it affects me. I'm not sure where the callback is in the code. |
This is our GitHub auth patch so that's where the code for this should be. That would be a good place to start |
I think I might have fixed this (I must have forgotten this issue existed). Is is still present in latest code-server? |
I cannot complete the OAuth flow for Gitlens+ login (required for their subscription). So I believe so. |
Ahhh my bad I was thinking about the builtin git extension. It looks like GitLens uses So I bet we need to patch |
Is this still a problem in latest code-server? I thought I fixed this
but I might be mistaken.
https://github.com/coder/code-server/blob/c35bf1311e85d031e40ca42fe0342a47c2c254a8/patches/base-path.diff#L293
|
Nearly six months for this comment that I initially sent through email to arrive. How strange. 😛 |
@Msadat97 what version of code-server are you using? and can you provide repro steps? i can look into it |
Are there any logs in the browser console? And what page does it redirect to? |
It basically does nothing other than opening the page that I sent before: These are the logs that I get, which I think are not relevant.
|
I can't find the authorization URL it's looking for either. Screen.Recording.2022-12-12.at.8.56.43.AM.movCan you try raising an issue with GitLens? Seems like it's not giving us the authorization URL to paste into code-server. |
Sure. I will mention the issue with the GitLens team. |
OS/Web Information
code-server --version
: 3.11.1Steps to Reproduce
Expected
Login to github without failing.
Actual
Failed logining into GitHub.
Logs
Screenshot
Notes
This issue can be reproduced in VS Code: No
The text was updated successfully, but these errors were encountered: