Skip to content

feat: Add support for custom username overrides#895

Draft
mathieu-lemay wants to merge 5 commits into
tinyauthapp:mainfrom
mathieu-lemay:username-overrides
Draft

feat: Add support for custom username overrides#895
mathieu-lemay wants to merge 5 commits into
tinyauthapp:mainfrom
mathieu-lemay:username-overrides

Conversation

@mathieu-lemay
Copy link
Copy Markdown

Add a new option to manually define the usernames for selected email addresses. This is mostly useful for OAuth providers that don't return preferred_username.

I'm opening this as a draft since it's a quick and dirty fix. If this is something you're interested in, I will take the time to add some validations (like email / username is not empty) and some tests.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f739e603-a646-4005-8990-ca2249aefa2d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@steveiliop56
Copy link
Copy Markdown
Member

@mathieu-lemay thank you for the pull request.

I am a bit skeptical about it. Why add another file, another field to manage and another mapping while we already have user attributes? Can't the same outcome be achieved by adding a new PreferredUsername field in the UserAttributes struct? Granted, it will require the user attributes to also mess with OAuth users but I believe it's a better idea because what if we also want a custom name for OAuth users in the future? Another file?

@mathieu-lemay
Copy link
Copy Markdown
Author

@steveiliop56 Thanks for the reply, this is exactly the sort of feedback I wanted! I didn't think of using UserAttributes because I haven't used that feature in my workflow with tinyauth. I'll look into it and get back to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants