Skip to content
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

Sign in not possible in a self hosted VsCode for web #2374

Open
laupas opened this issue Nov 24, 2022 · 17 comments
Open

Sign in not possible in a self hosted VsCode for web #2374

laupas opened this issue Nov 24, 2022 · 17 comments
Assignees
Labels
area-pro-account Issues or features related to Pro accounts bug Something isn't working support-triaged Support has reviewed, verified, or reproduced this
Milestone

Comments

@laupas
Copy link

laupas commented Nov 24, 2022

Description

Hi all

I run VsCode (latest docker version from lscr.io/linuxserver/code-server:latest) and have installed Gitlab+ as an extension.
When I try to log in, the redirect is not working.

I tried to get the return URL from the browser URL:
https://app.gitkraken.com/register?referrer=gitlens&pass-token=true&return-url=https://vscode.lauener.zone/stable-XXXXXXXX/callback?vscode-reqid%3D2%26vscode-scheme%3Dcode-oss%26vscode-authority%3Deamodio.gitlens%26vscode-path%3D%252Fdid-authenticate%26vscode-query%3Dgkstate%XXXXXXXXXX

and enter the full URL and just the return_url path in the text box which was showing up on VsCode web to login. But it is not working.

I tried it locally with the following Docker command:

docker run --rm -it
--name=code-server
-e TZ=Europe/London
-p 8443:8443
-v /Users/pascal/work/vscode:/config
lscr.io/linuxserver/code-server:latest

Same error. But what I saw on the output window is:

[2022-11-23 13:00:32.825]
Cancelled
[2022-11-23 13:01:04.071]
Cancelled
[2022-11-23 13:01:42.702]
Cancelled
[2022-11-23 13:01:55.546]
Cancelled
[2022-11-23 13:02:04.799]
Cancelled

same also if I install it locally with brew on mac os

GitLens Version

13

VS Code Version

lscr.io/linuxserver/code-server:latest

Git Version

git version 2.34.1

Logs, Screenshots, Screen Captures, etc

[2022-11-23 13:00:32.825]
Cancelled
[2022-11-23 13:01:04.071]
Cancelled
[2022-11-23 13:01:42.702]
Cancelled
[2022-11-23 13:01:55.546]
Cancelled
[2022-11-23 13:02:04.799]
Cancelled

@laupas laupas added potential-bug triage Needs to be looked at labels Nov 24, 2022
@tdegrunt
Copy link

I'm having the same issue, though I'm using Blink shell and vscode from a VPS, but same thing - can't login to Gitlens +
Is there some way to activate it using a code?

@chof64
Copy link

chof64 commented Dec 7, 2022

I'm having the same issue, I'm self-hosting VS Code Server.

@eamodio eamodio self-assigned this Dec 15, 2022
@eamodio eamodio added bug Something isn't working and removed potential-bug triage Needs to be looked at labels Dec 15, 2022
@eamodio eamodio modified the milestones: 13.2, 13.2-patch Dec 15, 2022
@sam-ulrich1
Copy link

Is there any roadmap to this being resolved? I just bought gitlens only to realize I can't use it

@sam-ulrich1
Copy link

@eamodio

@eamodio eamodio modified the milestones: 13.2-patch, 13.3-patch Mar 7, 2023
@eamodio eamodio modified the milestones: 13.3-patch, 13.5 Mar 14, 2023
@d13 d13 added the area-pro-account Issues or features related to Pro accounts label Mar 16, 2023
@eamodio eamodio modified the milestones: 13.5, Soon™ Apr 6, 2023
@eamodio
Copy link
Member

eamodio commented Apr 13, 2023

@sam-ulrich1 @chof64 @tdegrunt @laupas

Can you all provide more details on your setup to help us get to the bottom of this? I've tried setting up WSL, Remote Tunnels, VS Code Server, VS Code Remote Tunnels on the web, etc and I don't have any issue logging in to GL+.

@laupas
Copy link
Author

laupas commented Apr 14, 2023

Hi @eamodio

I use coder hosted in docker on a mac mini, url exposed with cloudflare tunnel.
Coder version: coder/coder@3ff2ae1
Coder is configured with wildcard access URL and open id authentification.

@sam-ulrich1
Copy link

Have you tried the above docker? You can also install the environment with the install script @ https://github.com/coder/code-server

@laupas
Copy link
Author

laupas commented Apr 14, 2023

I was initially using VsCode standalone (lscr.io/linuxserver/code-server:latest). Then I tried the Image from https://github.com/coder/code-server, and finally, I moved to a coder Installation. On Coder I use the Image from codercom/code-server:ubuntu as the basis for my VsCode.

I had the same behavior with all 3 installation ways: When I click the "Sign in" button, it redirects me to the gitkraken account page, asks me for login and after several URL forwards, it ends me on the page "https://app.gitkraken.com/products?referrer=gitlens&pass-token=true".

@sam-ulrich1
Copy link

I was initially using VsCode standalone (lscr.io/linuxserver/code-server:latest). Then I tried the Image from https://github.com/coder/code-server, and finally, I moved to a coder Installation. On Coder I use the Image from codercom/code-server:ubuntu as the basis for my VsCode.

I had the same behavior with all 3 installation ways: When I click the "Sign in" button, it redirects me to the gitkraken account page, asks me for login and after several URL forwards, it ends me on the page "https://app.gitkraken.com/products?referrer=gitlens&pass-token=true".

@laupas I was responding to @eamodio. With that said, we have the same problem. I've tried code-server on my local machine and on coder including with a public domain and ssl

@sam-ulrich1
Copy link

sam-ulrich1 commented Apr 14, 2023

@eamodio Steps to reproduce

  1. docker run --rm -it --name=code-server -e TZ=Europe/London -p 8443:8443 lscr.io/linuxserver/code-server:latest
  2. Open http://localhost:8443 in your browser
  3. Ctrl+~ (Open Terminal)
  4. git init
  5. Install Gitlens Extension
  6. Attempt to sign-in

@sam-ulrich1
Copy link

@eamodio just give me a high level description of where to look in the codebase for the pro auth stuff and I'll fix it when I get some free timw

@sam-ulrich1
Copy link

@eamodio I paid for GitLens and still can't use it. I'm literally offering to fix this for you if you just meet me half way and give me a high level overview.

@eamodio
Copy link
Member

eamodio commented May 2, 2023

@sam-ulrich1 Sorry for the delay, I've been out for the last 2 weeks. I'm quite sure the issue is on our server-side (we don't allow redirects to a URL we don't "know") and can't be fixed purely from the GitLens side. I am working on other auth changes and will be digging into this at the same time. I'm hopeful we will have a solution in the very near future. Really sorry for the inconvenience.

@eamodio
Copy link
Member

eamodio commented May 2, 2023

@sam-ulrich1 Thank you for the SUPER easy reproduction steps -- I was able to confirm that this must be addressed on our servers and there isn't anything GitLens can do until that happens. The crux of the issue is that we don't want to allow random redirects from our auth for security, but still need to support these dynamic environments. Right now, when we encounter an "unknown" redirect the whole flow is aborted, but we will be adding an alternate flow that won't redirect but will provide a code on the completion page that can be copy/pasted into GitLens that will allow it to complete the auth process.

Again very sorry for the delay and inconvenience here.

@laupas
Copy link
Author

laupas commented May 4, 2023

@eamodio why you do not add the option, that trusted custom domains can be added on the user account? Or as a simple solution, show the verification code on your site, which can be entered in gitlens (the option to enter is already there).

@eamodio
Copy link
Member

eamodio commented May 4, 2023

@laupas

show the verification code on your site

That's exactly what we are doing

@eamodio eamodio assigned axosoft-ramint and unassigned eamodio Jun 16, 2023
@jkelroy jkelroy added the support-triaged Support has reviewed, verified, or reproduced this label Jul 18, 2023
@molamooo
Copy link

molamooo commented Oct 6, 2023

Here is a temporary fix: coder/code-server#4107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pro-account Issues or features related to Pro accounts bug Something isn't working support-triaged Support has reviewed, verified, or reproduced this
Projects
None yet
Development

No branches or pull requests

9 participants