But the question is, how can I update them once they change on our side (in the app)? I log out and log in with SSO, sending a different name, username and photo, but the old ones remain. I also checked off these things in the admin, which seems like it ought to override at least the avatar, but nothing happens:
It is good enough to create the account, with the correct info. But it doesnât override it later on subsequent logins.
According to this I have to enter the Rails app and set things like SiteSetting.discourse_connect_overrides_avatar . I donât know if this is because itâs old instructions, but the admin control panel doesnât even contain stuff like âoverride nameâ and âoverride usernameâ.
@EGreg did you find a solution for this yet?
Iâm facing the same issue with a self-hosted discourse.
SSO login doesnât seem to override the username for existing accounts that existed before implementing SSO, even though the âoverride usernameâ setting is enabled.
Sorry. I donât know if the to of my head about how existing accounts get connected and whether they get renamed or I would have responded on the other topic.
Looking at this topicâs OP, I see that the auth overrides username setting isnât shown as being enabled in the screenshot. That setting needs to be enabled for DiscourseConnect to override the username. It would be great if the settings page could make it more obvious that these three settings are related to DiscourseConnect:
auth overrides email
auth overrides username
auth overrides name
Also, make sure the users are logging out of Discourse, then logging back in via DiscourseConnect. If they donât log out of Discourse, the change wonât take effect. You can get around that issue by making an API call to the sync_sso route on the userâs behalf: Sync DiscourseConnect user data with the sync_sso route.
Thanks, everyone.
I tried again with a different username and it worked.
I figured it was related to discourse username rules. Since the new username was starting with an underscore, it was invalid as per discourse rules and that could be the reason it wasnât reflected in the forum.