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

How to make extension login persistent across devices? #6727

Open
balajib-b opened this issue Mar 23, 2024 · 6 comments
Open

How to make extension login persistent across devices? #6727

balajib-b opened this issue Mar 23, 2024 · 6 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@balajib-b
Copy link

What is your suggestion?

this feature to store the credentials of logins that we do in extensions (gitlab, mongodb, circleCI etc...) persistent across code-server reboot or login via a new device would save more time from creating new auth tokens from all those saas services and cut-off the time required to configure a new device. i miss the on-the-go access to my dev environment feel when i login via new device.

Why do you want this feature?

it makes job easier by not asking me to login each time i use my code-server from new device

Are there any workarounds to get this functionality today?

not that i know anything yet

Are you interested in submitting a PR for this?

i am not sure of the code server architecture yet.

@balajib-b balajib-b added the enhancement Some improvement that isn't a feature label Mar 23, 2024
@balajib-b
Copy link
Author

@code-asher @benz0li any thoughts on this?

@benz0li
Copy link
Contributor

benz0li commented Mar 24, 2024

[...] the secret storage went browser-only [...]

#6450

@benz0li
Copy link
Contributor

benz0li commented Mar 24, 2024

Set token with environment variables

If you often delete your VS Code storage (such as in Gitpod containers) you can create environment variables before starting VS Code. If you set the token in an environment variable you don't have to set the personal access token every time you delete your VS Code storage.

  • GITLAB_WORKFLOW_INSTANCE_URL: GitLab instance URL (e.g. https://gitlab.com).
  • GITLAB_WORKFLOW_TOKEN: personal access token, which you created during setup.

The token configured in an environment variable is overridden if you configure a token for the same GitLab instance in the extension.

GitLab Workflow

@benz0li
Copy link
Contributor

benz0li commented Mar 24, 2024

IMHO more extensions should allow reading their token from an environment variable.

@code-asher
Copy link
Member

code-asher commented Mar 25, 2024

We do patch user storage to go to disk instead of the browser so I think it would not be completely out of line to try moving secrets back to the disk as well, but I am not sure how easy it would be, and ideally we read both to prevent breaking existing secrets, or make it an option.

If it was made an option maybe we could even submit the idea upstream, surely Codespaces users might want to persist their credentials across multiple browsers/devices as well.

@code-asher
Copy link
Member

code-asher commented Mar 25, 2024

Although I guess upstream will probably just say to use settings sync, which is not an option for code-server from what I understand.

But does settings sync copy credentials as well? Not sure about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

3 participants