Skip to content

Bind OAuth account to an existing account and unauthorized access may happend now #4732

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

Open
vxtls opened this issue May 30, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@vxtls
Copy link

vxtls commented May 30, 2025

Describe the solution you'd like

Memos has added OAuth support, which is great, but I found that I couldn't bind a custom/built-in OAuth service to an existing service through settings.
If the username is the same, it will automatically log in to the existing service with the same username. Here is actually an issue. If the username happens to be the same, could it lead to unauthorized access? Therefore, it is necessary to implement a way for users to bind OAuth services to existing accounts.

Type of feature

Integrations

Additional context

No

@vxtls vxtls added the enhancement New feature or request label May 30, 2025
@panluoyant
Copy link

panluoyant commented May 31, 2025

This is obviously an issue that could lead to unauthorized access. the normal logic is that users link their social media accounts (OAuth 2.0), but now the system is directly matching usernames. For example, if someone on GitHub has a username called “vscode,” and a user on my Memos instance also has the username “vscode,” even if these two accounts are unrelated, the GitHub user named “vscode” would still be able to log in to the Memos instance. This constitutes unauthorized access. The developers may not have considered this possibility.

@johnnyjoygh
Copy link
Collaborator

the normal logic is that users link their social media accounts (OAuth 2.0), but now the system is directly matching usernames.

@panluoyant Account linking is a separate topic and requires more time and effort to implement.

In Memos, SSO is added by administrators and includes the optional identity filter to prevent unauthorized users. So I don't think this a "security" issue.

@vxtls
Copy link
Author

vxtls commented Jun 3, 2025

the normal logic is that users link their social media accounts (OAuth 2.0), but now the system is directly matching usernames.

@panluoyant Account linking is a separate topic and requires more time and effort to implement.

In Memos, SSO is added by administrators and includes the optional identity filter to prevent unauthorized users. So I don't think this a "security" issue.

However, you cannot ensure that these single sign-on (SSO) sources and the memos instance do not use the same username. Normally, the logic of binding social accounts is essential.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants