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

Multiple account sign in and switching #166176

Closed
Thaina opened this issue Nov 12, 2022 · 17 comments
Closed

Multiple account sign in and switching #166176

Thaina opened this issue Nov 12, 2022 · 17 comments
Assignees
Labels
*out-of-scope Posted issue is not in scope of VS Code under-discussion Issue is under discussion for relevance, priority, approach user-profiles User profile management

Comments

@Thaina
Copy link

Thaina commented Nov 12, 2022

Sometimes it was more convenient to have multiple account; such as, organization account, administration account, company provided account, separate from owned individual account and can manage each project separately or having separate loaded extension and setting profile

For example I myself have my own current account that mainly write C# and unity. But I also have responsibility on devops and server in my company, which mainly use js and some specific tools and access to company repository in full access mode, which I don't want to do that with my own account and I don't want to (openly) add my account to be collaborator of those projects or organization

Also sometimes some company will provide account for employee for managerial purpose

So I wish that I could login with multiple account in vscode without signing out. And when I open an instance of vscode project/folder/workspace I can switch account, and make it become default of that project so when reopen it will auto select account that fit for the project for each instance

@TylerLeonhardt
Copy link
Member

@sandy081 this sounds like Profiles

@sandy081
Copy link
Member

Can you please try our latest preview feature - Profiles (https://code.visualstudio.com/updates/v1_69#_settings-profiles) and let us know if it suffice your needs.

@Thaina
Copy link
Author

Thaina commented Nov 22, 2022

@sandy081 I have tried that new setting profile feature. I have expect that I can switch github account by profile. Actually I expect that profile feature are the github account switching

I can't find a way to do that so I have create this issue

@sandy081
Copy link
Member

I see. Currently profiles are accounts are separate concepts. Environment switching only happens through profiles. Have you tried creating different profiles for your use cases and log in to different accounts in each profile? The only difference you have to make is to use profiles to switch but not accounts. Switching a profile can also switch the account you logged in.

CC @isidorn

@sandy081 sandy081 added feature-request Request for new features or functionality user-profiles User profile management under-discussion Issue is under discussion for relevance, priority, approach and removed feature-request Request for new features or functionality labels Nov 22, 2022
@sandy081 sandy081 reopened this Nov 22, 2022
@Thaina
Copy link
Author

Thaina commented Nov 22, 2022

@sandy081 Thanks you for your suggestion. I will try that

@isidorn
Copy link
Contributor

isidorn commented Nov 22, 2022

@sandy081 thanks for the ping. Let's see if more users find this confusing. I will also make sure to ask users in the user study.

@Thaina
Copy link
Author

Thaina commented Nov 22, 2022

I have tried creating new setting profile. Then logout and login second github account. When I switch back to default profile the second account still persist

When I try to sign out and sign in first account in default profile, then switch profile to second profile, it still is first account

I am understood that account and profile are separate concept. So there is 2 way in my mind. One is to have each of these feature can be switching in each project or workspace independently. Second option is to have profile depend on account and so setting sync will sync profile into account separately, and just allow copy or clone profile from another account

@sandy081
Copy link
Member

@TylerLeonhardt I remember we discussed that whether we wanna make accounts profile specific? I think this is one such use case where user wants this behaviour.

@sandy081 sandy081 assigned TylerLeonhardt and unassigned sandy081 Nov 22, 2022
@sandy081 sandy081 removed the user-profiles User profile management label Nov 22, 2022
@sandy081 sandy081 self-assigned this Nov 22, 2022
@sandy081 sandy081 added the user-profiles User profile management label Nov 22, 2022
@isidorn
Copy link
Contributor

isidorn commented Nov 22, 2022

@sandy081 I strongly feel that accounts should be global, and not stored in a profile.
Not sure what is the exact use case where you would want account to be a part of a profile. I also think we should strive towards - users just login once and all services light up.

@TylerLeonhardt
Copy link
Member

Yes we don't want accounts to be tied to specific profiles exactly as @isidorn has summarized.

I understand that folks might want to be able to log in to multiple GitHub accounts, but that's a totally separate issue that has nothing to do with profiles: #127967

@TylerLeonhardt TylerLeonhardt added the *out-of-scope Posted issue is not in scope of VS Code label Nov 23, 2022
@VSCodeTriageBot
Copy link
Collaborator

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2022
@Thaina
Copy link
Author

Thaina commented Nov 23, 2022

@TylerLeonhardt It might be out of scope of setting profiles, but is it out of scope of vscode too?

@TylerLeonhardt
Copy link
Member

@Thaina switching GitHub accounts within VS Code is tracked in the issue I linked. We want to do it, but are blocked by GitHub's current experience.

@Thaina
Copy link
Author

Thaina commented Nov 23, 2022

@TylerLeonhardt I have made this issue because I think about alternative approach, the active account always be one account. Just that vscode remember a list of token and allow switch account per instance (and remember the default in each project)

This would not solve the copilot collision though

@TylerLeonhardt
Copy link
Member

I think there are other signals to tell us what account to use.

For settings, extensions, etc we have Profiles.

For something like the GitHub Pull Request extension, that uses the git origin (and other things) to determine if the repo is a GitHub repo or a GitHub Enterprise Server repo and asks for the auth of the correct one.

Since we don't have multiple GitHub account support, it's hard to design what that will look like when GitHub finally adds support on GitHub.con for multi accounts

@Thaina
Copy link
Author

Thaina commented Nov 24, 2022

@TylerLeonhardt I don't think it would require github to support multiple account and I don't think github would do that. Just that vscode support multiple sign in account stored in vscode. It did not meant to be active and could use action of every account at once. As I said it still only one active

What I imagine is when we sign in to github, vscode just got the oauth token to use in some actions. The key is vscode could store all token and have UI for switching account. In effect it like we sign out and sign in to another account, but skip all the flow

In essence it's similar to google account list, or the chrome profile. And just also remember the last account of the project

And maybe in the future we could allow each extension or command or task to select or specify account for its action

@Pablo-Oliveira
Copy link

Pablo-Oliveira commented Feb 24, 2024

I am particularly interested in the option of multiple Microsoft account logins to be able to manage multiple remote access tunnels.
I personally work on a single project at a time, but very often I need to provide support in multiple production environments.
Furthermore, using two-factor authentication gives me a lot of security and allows me to free myself from the need to manage multiple ssh keys.

There is even a company creating a similar solution to solve this problem as well as others:
https://www.bastionzero.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*out-of-scope Posted issue is not in scope of VS Code under-discussion Issue is under discussion for relevance, priority, approach user-profiles User profile management
Projects
None yet
Development

No branches or pull requests

6 participants