I am planning on migrating users over to discourse.
Which field in the db does discourse use to uniquely identify a user account?
I need to use a common id across multiple apps to link everything up so may need to change the unique key to that value…
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