Skip to content

[BUG] GitHub OAuth Sign-In Skips Username Validation #139

@YousefAdel23

Description

@YousefAdel23

🔖 Bug ID

No response

📝 Bug Summary

When users sign in using GitHub OAuth, the returned GitHub username is not validated at all.
Unlike normal sign-up or manual username entry (which uses strict regex rules), the GitHub sign-in flow bypasses validation completely.

🔄 Steps to Reproduce

Sign in using GitHub OAuth.

After successful login, go to the Search page.

Try to open the profile returned in search results.

You will see that the username is not validated and appears in an invalid format, for example:

like @mohamed-sameh-albaz

🚨 Severity

Minor (low impact)

🎯 Priority

P0 (fix immediately)

❌ Actual Result

When mentioning (@username) or searching for a user, the system expects usernames that match the app’s username regex.
However, GitHub OAuth usernames do not follow this regex, so:

Search does not return the GitHub user

Mention autocomplete does not detect the user

GitHub username appears in an invalid format

✅ Expected Result

Usernames from GitHub should match the same regex rules used for mention and search
OR

GitHub usernames should be validated or normalized before saving so they become compatible with the regex
AND

📋 Error Messages/Logs

📸 Screenshots/Videos

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions