# Changing the unique key to identify users

**URL:** https://meta.discourse.org/t/changing-the-unique-key-to-identify-users/84457
**Category:** SSO
**Created:** [03.Апрель.2018 11:43:53 UTC](https://meta.discourse.org/t/changing-the-unique-key-to-identify-users/84457 "2018-04-03T11:43:53Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [03.Апрель.2018 11:50:43 UTC](https://meta.discourse.org/t/changing-the-unique-key-to-identify-users/84457/2 "2018-04-03T11:50:43Z")

</div>

> [@shahidmir](#):
>
> I need to use a common id across multiple apps

This sounds like you want to use [SSO](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045).

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 🙂

---

_[View the full topic](https://meta.discourse.org/t/changing-the-unique-key-to-identify-users/84457)._
