RocketChat / RocketChat/Rocket.Chat
OAuth - Single intransmutable reference should be used for user identification / mapping
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Currently Rocket.Chat tries to use a combination / permutation of user, username, and email fields to try to determine if a user being authenticated via OAuth already exists within Rocket.Chat. However as all these properties are displayed within the UI in one form or another there is multiple reasons why these properties may need to be changed within the UI.
The best solution to this would be to add a new "intransmutable" identifier in the OAuth property mapping that is not changeable or even displayed to anyone other than possibly admin users within the UI. A good example of this would be an object GUID in Azure. This ensures that the mapping is never lost and resolves a multitude of issues around "email already exists" and "username already exists" type errors for accounts that have had properties changed, but should otherwise map without issue.
Steps to reproduce:
This potentially addresses multiple issues around OAuth configuration / logon issues.
Expected behavior:
To have the ability to change user displayed information without invalidating account configurations.
Actual behavior:
Couple of Examples:
https://github.com/RocketChat/Rocket.Chat/issues/18391
https://github.com/RocketChat/Rocket.Chat/issues/19357
Server Setup Information:
- Version of Rocket.Chat Server: 3.10
- Operating System: Ubuntu 20.04
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: v12.18.4
- MongoDB Version: 4.0.20
Client Setup Information
- Desktop App or Browser Version: Desktop App 3.1.0 / Google Chrome (latest)
- Operating System: WIndows 10
Additional context
Relevant logs:
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
Start by tracing the OAuth property mapping and account-matching behavior described in this issue, then compare the related cases in issues #18391 and #19357. Define the immutable identifier's mapping and UI visibility requirements; done means display-field changes continue to resolve to the same account without duplicate email or username errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100