SSO user created with 1 appended at end of username

(Michael Downey) #1

Our Discourse installation uses the “official” SSO strategy. However, before we turned it on, I had a user created manually with the same username as his SSO username. A couple days ago, it seems that he logged in via SSO, but a new user was created for his user ID, with a 1 appended to the end.

In other words …

  • Manually created user: foobar
  • “New” user that was created: foobar1

There is no user foobar1 in our directory. I did notice that the e-mail address that came over with his “1” account was different than the e-mail address used for his manually-created account.

Any ideas (a) why this happened, and (b) how we can avoid it happening in the future?

(Adam Capriola) #2

There you go. The username isn’t what’s used to map accounts; it’s the external_id, then email.

(Michael Downey) #3

Sorry, I’m not familiar with the SingleSignOnRecord model.

Based on the comments from @sam does this mean that because (a) the manually-created account didn’t have any value for external_id and (b) the e-mail address was different … then a new user was created and the 1 appended to the username? Just wanted to verify.

How could someone prevent this from happening when mixing manually-created (invited) users along with SSO-created users? That’s why it seemed like a bug to me.

Is there any way to manually update the SingleSignOnRecord model for users so we don’t have this problem with other users?

(Kane York) #4

I think the answer is “have the same email for both accounts”.

(Michael Downey) #5

Heh, if only. Sadly we live in an imperfect world and can’t control user behavior. :smile:

(system) #6

(David Taylor) #7