sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.29k forks source link

Unable to authenticate access token + vscode #41620

Open globalhuman opened 2 years ago

globalhuman commented 2 years ago

Hi,

I am unable to verify/authenticate the vscode extension sourcegraph.sourcegraph with my sourcegraph account. I have tried multiple methods of creating a sourcegraph account including:

Step to reproduce:

The following error is presented to me on all occasions:

Unable to verify your access token for sourcegraph.com. Please try again with a new access token or restart VS Code if the instance URL has been updated.

/cc @muratsu @jjinnii @ryankscott

malomarrec commented 2 years ago

Hey @taylorsperry, it looks like this issue was created by someone outside Sourcegraph. Assigning you to triage it! Please answer and route to the right team by adding their team label, then remove the triage-bot/needs-triage label

ryankscott commented 2 years ago

Hi @globalhuman, is this issue still persisting for you? Are you trying to connect to the sourcegraph.com instance or your own? What is the value for the "sourcegraph.url" setting in your VS Code settings?

globalhuman commented 2 years ago

Hi @ryankscott,

I am unable to retrieve a new token to confirm if it's working as the URL https://sourcegraph.com/users/settings/tokens is reporting a 404.

Are you trying to connect to the sourcegraph.com instance or your own?

sourcegraph.com

What is the value for the "sourcegraph.url" setting in your VS Code settings?

It wasn't set. I've used the default value as well as "https://sourcegraph.com/.api/graphql"

globalhuman commented 2 years ago

I was able to generate a new token, the website is behaving sporadically on the Safari browser.

It is still not able to authenticate.

ryankscott commented 2 years ago

@globalhuman could you try set the sourcegraph.url setting in VS Code to "https://sourcegraph.com" and see if the problem persists?

ChristopherHaws commented 1 year ago

Is there any update on this issue? I also have this same issue.

issue

mgasca commented 11 months ago

I am also having this issue

VS Code Details

Version: 1.84.2
Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Date: 2023-11-09T10:52:33.687Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 21.6.0

Sourcegraph Extension Details

sourcegraph.sourcegraph
Version: v2.2.16

Extension Settings

Sourcegraph Instance URL: default
Access Token: from user settings

Expected

"Authenticate Account" with valid token and default public sourcegraph URL authenticates without issue

Actual

Authentication fails with message

Unable to verify your access token for sourcegraph.com. Please try again with a new access token or restart VS Code if the instance URL has been updated.

Related

57607

Rustin170506 commented 7 months ago

A workaround: https://github.com/sourcegraph/sourcegraph/issues/57607#issuecomment-1975579449