Discord Login auth doesn't update username correctly

Hello, currently logging in with Discord Auth with Auth overrides username and auth overrides name enabled. The name is supposed to be Discord nickname. However, it puts Discord username as the name and changes username to User1 instead of the actual username.

Here is a video to show an example of the bug.

2 Likes

Note that the Discourse username must not contain spaces or special characters.

I had an SSO connection that had been running for some time (with an @ in the username). After one of the recent updates, this ceased to function. I replaced the @ with an underscore, and everything has been working since.

Manually entering an @ in the username is also not permitted in Discourse.

1 Like

Can you see if this fixes the issue: DEV: Fix username/name mapping for Discord auth by pmusaraj · Pull Request #31494 · discourse/discourse · GitHub? It should pull the name if available from Discord, and default back to the username if it is empty. We could likely make this smarter and only set the name if/when necessary, but the current approach at least doesn’t change existing functionality for users with no display name in Discord.

2 Likes

This topic was automatically closed after 12 days. New replies are no longer allowed.