- Create an Auth0 account if you don’t already have one
- Install the Discourse OAuth2 Basic Plugin. This plugin is already installed if you are on the Business Plan if you are on the Standard Plan just ask us to upgrade you to Business!
- Clients > Create client
- Give your client a name like “Discourse”, click on “Regular Web Application”, click “Create”
- Ignore the Quick Start tab, and click the Settings tab
- Under Allowed Callback URLs set it to:
- Turn off: “Use Auth0 instead of the IdP to do Single Sign On”
- At the bottom click on “Advanced” > “Endpoints”. This will show you the urls to copy over to discourse.
- Save Changes (to save your callback url)
Now inside of your Discourse site copy over the following Auth0 values into your Discourse settings:
- oauth2 client id →
- oauth2 client secret →
- oauth2 authorize url →
- oauth2 token url →
- oauth2 user json url →
- oauth2 user id path →
- oauth2 json email path →
- oauth2 enabled →
- oauth2 button title → 'with Auth0`
That’s it! Now you will have an Auth0 button on the Discourse sign-up/sign-in page.
Here is a gif of it in action: