element-hq / element-hq/element-web
OAuth flow, allow manually passing the code to the client to enable better multi-profile handling
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Your use case
#### What would you like to do?
Element hat this --profile cli argument that allows configuring mutliple element profiles (private, work etc.). At work we use OAuth and the login flow requires a browser-login that then returns to the client with a custom app link like `io.element.desktop:/vector/webapp/?no_universal_links=true#code=xxxxxx`
The issue is, that the link is always only assigned to one Desktop-Link and not the alternative profiles. So my private element tries to log into the other server and fails instead of my 'work' profile element.
#### Why would you like to do it?
Improve ways of handling multiple profiles.
#### How would you like to achieve it?
There are multiple ways to improve this. One would be to show the code on the website (maybe as a collapsible box so it is not displayed full on screen all the time) and a Copy-To-Clipboard button.
The client would have another link called 'Login with Code' where one could manually paste the code to complete the flow.
Another approach (and generally a neat idea) would be a kind of profile-manager. If the client detects that there are multiple config dirs in the pattern as created by profiles, instead of launching, it shows a profile selector dialog where one can select, add or remove profiles. So once someone has a second profile and uses the oauth flow, the profile selector allows selecting the 'right' profile to complete the login.
### Have you considered any alternatives?
_No response_
### Additional context
Linux, NixOS, Kernel 7.0, KDE Plasma
Contributor guide
Research direction
No source files, tests, or entry points are named. Start by tracing the OAuth browser-return flow and profile-related configuration handling, then determine whether manual code entry or profile selection is in scope. Done should be defined by a reproducible multi-profile OAuth login that completes against the intended profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100