# How to connect my (existing) User Database?

**URL:** https://meta.discourse.org/t/how-to-connect-my-existing-user-database/73597
**Category:** Development
**Created:** [7. November 2017 um 12:26 UTC](https://meta.discourse.org/t/how-to-connect-my-existing-user-database/73597 "2017-11-07T12:26:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mertins-mir](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mertins-mir/32/81852_2.png) [@mertins-mir](https://meta.discourse.org/u/mertins-mir)
#### Post date: [7. November 2017 um 12:26 UTC](https://meta.discourse.org/t/how-to-connect-my-existing-user-database/73597/1 "2017-11-07T12:26:31Z")

</div>

Hi all,

I have already an existing Webseite with a User DB. How can I use the Users from this DB to log into Discourse? It would be the best that they are automatically logged in, when the are already logged into my Website.

My Problem at the moment is, that the PW in my DB is encrypted and I can’t push them via Curl into Discourse. Is there a best practice article somewhere?

Thanks for your help!

Frank

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [7. November 2017 um 12:33 UTC](https://meta.discourse.org/t/how-to-connect-my-existing-user-database/73597/2 "2017-11-07T12:33:16Z")

</div>

If you want to move them to discourse, rather than use sso, you can use an import script and [Migrated password hashes support](https://meta.discourse.org/t/migrated-password-hashes-support/19512)

But you want to keep your old site, so you want sso.

---

<div class="post-metadata">

### Author: ![mertins-mir](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mertins-mir/32/81852_2.png) [@mertins-mir](https://meta.discourse.org/u/mertins-mir)
#### Post date: [7. November 2017 um 13:38 UTC](https://meta.discourse.org/t/how-to-connect-my-existing-user-database/73597/3 "2017-11-07T13:38:35Z")

</div>

I don’t want to move them, they should stay in our DB becuse new registrations are comming in through our Website.

How can I create a custom SSO?

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [7. November 2017 um 14:03 UTC](https://meta.discourse.org/t/how-to-connect-my-existing-user-database/73597/4 "2017-11-07T14:03:36Z")

</div>

Like so:

> [@Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045):
>
> [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) is a core Discourse feature that allows you to configure “Single Sign-On (SSO)” to completely outsource all user registration and login from Discourse to another site. Offered to our [pro, business and enterprise hosting customers](https://discourse.org/pricing). information_source (Feb 2021) ‘[Discourse SSO](https://meta.discourse.org/t/13045?silent=true)’ is now ‘[DiscourseConnect](https://meta.discourse.org/t/13045?silent=true)’. If you are running an old version of Discourse, the settings below will be named sso\_... rather than discourse\_connect\_... The Problem Many sites wishing to integrate wit…
