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.