Hello there, I have created a standalone ready-to-run OAuth2 Authorization Server with Discourse SSO support for your needs. I believe it will be useful for some people.
This piece of software acts as OAuth Authorization Server for all modules in your ecosystem and has Discourse SSO 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.
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.
It has Discourse SSO 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.
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.