codesandbox / codesandbox/codesandbox-client
Feature Request: Support Account Switching
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
Hey all! Coming in with another feature request, this time driven by using CodeSandbox at work!
Short description:
Please add the ability to quick switch accounts (ie: between GitHub and Google) so that I don't have to constantly log in and out of my personal and work CodeSandbox accounts.
Long description:
While ideally, a company like mine would also like to have a Single Sign-On solution as well, in general we want to have all employees using an account using a company email address. For me personally, what this leads to is that I find myself needing to switch between my GitHub linked personal account and my company email linked Google account. Having a way to be logged into multiple accounts at once and being able to quickly switch between the two would be ideal from a user-experience standpoint.
As far as an account switcher UI goes, something similar to Google's setup would be fine.
Each logged-in account would behave as if it was a normal session, switching should only swap your active session token in localstroage (assuming this is still how session JWTs are stored).
Switching accounts would navigate you to your dashboard in all cases. The idea being that you may be viewing a private sandbox in one account that another account may not have access to. Any relevant application state regarding sandboxes should be cleared to prevent navigating back to the Editor UI from using files from a previous session, secrets, etc. Navigating to the dashboard in this case would have to behave like a hard-refresh, forcing the page to reload it's contents from the API server.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by locating the authentication flow, session JWT storage in localStorage, dashboard navigation, and Editor UI state handling. Done means multiple accounts can remain logged in, switching changes the active session, clears relevant application state, and reloads the dashboard data from the API server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100