Changing the unique key to identify users

This sounds like you want to use SSO.

If you follow that approach, you have two options:

  • Discourse can be managing user accounts. In this case, Discourse should be made the SSO provider. All other apps will have to use Discourse’s internal user id. (You should never attempt to modify the identifier of existing users, though.)
  • Discourse can use another app’s user database. In this case, the other app needs to implement the SSO protocol. In that case, you can just pass the id the external app uses internally to Discourse, and Discourse will remember it and use it to recognize the user later. (If the id is not found, Discourse will look at the email address.)

I’d recommend the latter approach because it’s a bit more flexible :slight_smile:

2 Likes