# OAuth2 Authorization and Resource Server

**URL:** https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810
**Category:** Extras
**Tags:** sso, discourseconnect
**Created:** [2017年八月24日 23:54 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810 "2017-08-24T23:54:50Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![bekce](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bekce](https://meta.discourse.org/u/bekce)
#### Post date: [2017年八月24日 23:54 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/1 "2017-08-24T23:54:50Z")

</div>

Hello there, I have created a standalone ready-to-run OAuth2 Authorization Server with [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) support for your needs. I believe it will be useful for some people.

[https://github.com/bekce/oauthly](https://github.com/bekce/oauthly)

Please give it a star if you like it, thanks!

---

<div class="post-metadata">

### Author: ![bekce](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bekce](https://meta.discourse.org/u/bekce)
#### Post date: [2018年一月15日 10:00 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/2 "2018-01-15T10:00:38Z")

</div>

This piece of software acts as OAuth Authorization Server for all modules in your ecosystem and has [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) support. It also has upstream OAuth Client support, which means users can connect their Facebook, Google, etc accounts to OAuthly. Below diagram summarizes its use.

 ![Untitled Diagram-2](https://global.discourse-cdn.com/meta/original/3X/a/c/ac88eeb6ba0c5e28551530a1ba25eaf1a15a1b0d.png)

---

<div class="post-metadata">

### Author: ![bekce](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bekce](https://meta.discourse.org/u/bekce)
#### Post date: [2018年一月15日 10:01 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/3 "2018-01-15T10:01:51Z")

</div>

BTW, I wanted to tag this with ‘sso’ but couldn’t find the option.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年一月15日 10:02 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/4 "2018-01-15T10:02:52Z")

</div>

Added!

ps: Looking into Your work

I Wonder what this Plugin does outside of the functionality that already exists in Discourse?

---

<div class="post-metadata">

### Author: ![bekce](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bekce](https://meta.discourse.org/u/bekce)
#### Post date: [2018年一月15日 10:33 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/5 "2018-01-15T10:33:05Z")

</div>

If your website or platform consist of multiple components (like www, store, forum, payment, email marketing, etc), this piece allows you to integrate users among those platforms via OAuth2 protocol. The functionality is comparable to Auth0.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年一月15日 10:34 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/6 "2018-01-15T10:34:12Z")

</div>

So It’s basically a Central IAM Solution?  
It’s not a Proper Discourse Plugin Though!

Why it exists under plugins then?

---

<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: [2018年一月15日 10:35 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/7 "2018-01-15T10:35:09Z")

</div>

> [@itsbhanusharma](#):
>
> 那它为什么存在于插件中呢？

我们将技术上不属于 Discourse 插件的扩展程序放在了 #Customization > Extras 中。

---

<div class="post-metadata">

### Author: ![bekce](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bekce](https://meta.discourse.org/u/bekce)
#### Post date: [2018年一月15日 10:45 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/8 "2018-01-15T10:45:25Z")

</div>

It has [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) integration in addition to being a Central IAM solution so I wanted to post here. I see a lot of people trying to integrate their components with Discourse and I think they would benefit from this. Feel free to ask questions about the usage and features.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年一月15日 13:06 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/9 "2018-01-15T13:06:27Z")

</div>

Can You Share instructions on Installing it on Say A VPS?

I desperately want to give it a spin and see what advantages it has but The instructions look very much like local development scene.

---

<div class="post-metadata">

### Author: ![bekce](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bekce](https://meta.discourse.org/u/bekce)
#### Post date: [2018年一月15日 14:04 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/10 "2018-01-15T14:04:05Z")

</div>

I just updated the README on github. Before running this on a vps, you can also just spin off a local version and connect to your discourse on a vps. Since they only communicate through user agent (browser), it should work just fine.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018年一月15日 14:30 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/11 "2018-01-15T14:30:35Z")

</div>

Thanks!

I already have done that Part! Hence Need a bit more clarity on how to set it up in Production Use.

---

<div class="post-metadata">

### Author: ![bekce](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bekce](https://meta.discourse.org/u/bekce)
#### Post date: [2018年一月15日 15:10 UTC](https://meta.discourse.org/t/oauth2-authorization-and-resource-server/68810/12 "2018-01-15T15:10:36Z")

</div>

Excellent. Have you checked out the updated instructions? What exactly do you need?
