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

feat: use token from local fs path #471

Merged
merged 5 commits into from
Aug 1, 2023
Merged

feat: use token from local fs path #471

merged 5 commits into from
Aug 1, 2023

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Jul 31, 2023

Context: https://sourcegraph.slack.com/archives/C05AGQYD528/p1690833224615029?thread_ts=1690216157.663499&channel=C05AGQYD528&message_ts=1690833224.615029

For users that do not have keychain available on their local machine, they can define the absolute path of the file that has the token available in JSON format.

Step 1: Sign into Cody with a valid token

Step 2: Create a JSON file to store the token you used to log in from Step 1 using the following format, save the file as token.json:

{
  "token": "token_string"
}

Step 3: in Command Palette, select Open User Settings (JSON) and add the following field:

{
  "cody.experimental.localTokenPath": "/Users/username/token.json"
}

Step 4: Replace /Users/username/token.json with the file path created from Step 2

Step 5: Reload VS Code, you should still be signed into VS Code

NOTE: This is set behind the experimental flag and remains undocumented as this should only be used as workaround at users' own risk.

Test plan

Follow the steps as described above

@abeatrix abeatrix changed the title feat: get token from local fs path feat: use token from local fs path Jul 31, 2023
@abeatrix abeatrix requested review from a team, umpox and philipp-spiess July 31, 2023 19:53
Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

vscode/src/services/SecretStorageProvider.ts Outdated Show resolved Hide resolved
@abeatrix abeatrix merged commit 86c4a6d into main Aug 1, 2023
9 checks passed
@abeatrix abeatrix deleted the bee/local_token branch August 1, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants