# Login from another user database

**URL:** https://meta.discourse.org/t/login-from-another-user-database/49608
**Category:** Development
**Created:** [September 2, 2016, 3:46am UTC](https://meta.discourse.org/t/login-from-another-user-database/49608 "2016-09-02T03:46:46Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Asoul](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Asoul](https://meta.discourse.org/u/Asoul)
#### Post date: [September 2, 2016, 3:46am UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/1 "2016-09-02T03:46:46Z")

</div>

I’m new to discourse,

Is it possible validate the login process by customized database information?

I have an original service with login/logout mechanism,

now I want to create a forum by discourse, and login/logout from the original service’s user database

or what’s the keyword to search in discourse forum

Thanks

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [September 2, 2016, 3:47am UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/2 "2016-09-02T03:47:09Z")

</div>

You want to look for “SSO”.

---

<div class="post-metadata">

### Author: ![Asoul](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Asoul](https://meta.discourse.org/u/Asoul)
#### Post date: [September 2, 2016, 3:48am UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/3 "2016-09-02T03:48:51Z")

</div>

Thanks! I’ll search it

---

<div class="post-metadata">

### Author: ![Asoul](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Asoul](https://meta.discourse.org/u/Asoul)
#### Post date: [September 2, 2016, 6:13am UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/4 "2016-09-02T06:13:04Z")

</div>

@mpalmer

Can I just access to the DB for user authentication, not through the SSO in discourse?

I have no idea if this take a large effort or not.

Is there any example?

Thanks

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [September 2, 2016, 6:15am UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/5 "2016-09-02T06:15:16Z")

</div>

If you’re asking what I think you’re asking, the answer is “no”.

---

<div class="post-metadata">

### Author: ![Tom\_Newsom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_newsom/32/115981_2.png) [@Tom\_Newsom](https://meta.discourse.org/u/Tom_Newsom)
#### Post date: [September 2, 2016, 11:47am UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/6 "2016-09-02T11:47:43Z")

</div>

You’d need to implement OAuth2 on your own system, then use:

> [@Discourse OAuth2 Basic](https://meta.discourse.org/t/oauth2-basic-support/33879/):
>
> discourse2Summary Discourse OAuth2 Basic supports basic OAuth2 providers, assuming they have a JSON API endpoint where user details can be retrieved by token.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Features This plugin allows you to use a basic OAuth2 provider as authentication for Discourse. It should work with many providers, with the caveat that they must provide a JSON endpoint for retri…

---

<div class="post-metadata">

### Author: ![Asoul](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Asoul](https://meta.discourse.org/u/Asoul)
#### Post date: [September 2, 2016, 1:12pm UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/7 "2016-09-02T13:12:24Z")

</div>

Hi @Tom_Newsom

I don’t know which one is a better choice: CAS or OAuth or others

As I know, OAuth can separate the resource permission and CAS can only check if login

Currently there is not so many resource to separate for OAuth, and seems CAS is simpler than OAuth (Is this correct?)

But if there is lots of resource in the future, I may need OAuth rather than CAS

What do you think?

Thanks

---

<div class="post-metadata">

### Author: ![Tom\_Newsom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_newsom/32/115981_2.png) [@Tom\_Newsom](https://meta.discourse.org/u/Tom_Newsom)
#### Post date: [September 3, 2016, 7:32pm UTC](https://meta.discourse.org/t/login-from-another-user-database/49608/8 "2016-09-03T19:32:36Z")

</div>

Well now we’re out of my comfort zone. I can’t help you here I’m afraid!
