PowerNukkit Ore to Discourse Auth Gateway
This app works as a simple replacement for SpongeAuth for those who want to use Discourse as the main SSO auth provider.
This app does not hold any state and don't store any data, all it does is to convert HTTP requests from Ore to Discourse and vice-versa.
Setup
Ore
- Edit the
Ore
settings fileOre/ore/conf/ore-default-settings.conf
in the folder where you installedOre
- Inside the
auth
block set a secure secret atsso
➡️ secret
, this will be your--auth-sso-api-key
- Inside the
auth
➡ api
set the url where this app will be running aturl
, this will be your--base-url
- (Optional) Inside the
auth
➡ api
set theavatar-url
tohttps://{domain-of-your-discourse-forum}/user_avatar/{domain-of-your-discourse-forum}/%s/120/1.png
replacing{domain-of-your-discourse-forum}
with the domain of your discourse forum, note that it appears twice in the URL.
Discourse
- Go to your
Discourse Admin Panel
➡️ Settings
➡️ Login
- Enable
enable discourse connect provider
(Please don't confuse withenable discourse connect
, the setting ends with provider) - Add the host where this app will be running and a random and secure SSO secret key of your choice to the
discourse connect provider secrets
settings, this will be your--discourse-sso-secret
parameter - Go to
Discourse Admin Panel
➡️ Customise
➡️ Themes
and repeat the next steps for each enabled theme that you have. - Click on the theme name, then on the
Edit CSS/HTML
- Add this to the end of the
tab:
"><link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css">
- Add this to the end of the