Help

Integration

Discourse OIDC Integration

Updated 15 Nov 2026 7 min read

This document explains how to implement Monosign with Discourse, the open source discussion platform. It covers Single Sign-On with OpenID Connect (OIDC), which is built into Discourse (the former OpenID Connect plugin is part of the core). Discourse uses the Authorization Code flow and reads the user from the ID token and the user information endpoint, so the OIDC/OpenID access key of Monosign is used. Before you continue, it is better to read the Discourse documentation (opens in a new tab).

This configuration was tested with Discourse 2026.11.0 installed with the official discourse_docker. If your version is different, please check the Discourse documentation.

OIDC is configured in the Discourse administration interface under Admin → Settings (search for openid_connect). SAML is not available in the core.

Monofor has no responsibility to do Discourse configurations. If you need support please contact the Discourse community or your Discourse support provider.

Instructions

This documentation contains 5 main steps for integration.

  1. Creating an application on Monosign

  2. Configuring the OIDC/OpenID settings on Monosign

  3. Assign a user to the Discourse application

  4. Configuration Single Sign-On for Discourse

  5. Sign In Test

1- Creating an Application on Monosign

Create your application on Monosign first. Open the Applications page from the left menu and click Add New.

image-20261030-191725.png

Discourse is not in the application catalog, so click Create from scratch.

image-20261030-191750.png

Fill in the application details on the Application tab and click Next.

discourse-01-application.jpg

Property

Value

Description

Name

Discourse

Name of the application shown to users on the Monosign portal and on the Monosign sign-in page.

Type

Web

Discourse is accessed through a web browser. Options: Web, Mobile, Desktop, API.

Url

Optional

Leave empty or enter the address of Discourse (for example https://<discourse-address>).

Logo

Optional

Browse and upload a logo; it is also shown on the Monosign sign-in page.

Users can see this application on their list

Enabled

Displays the application on the user portal.

On the Access tab define who can reach the application and click Create Application.

image-20261030-192040.png

Property

Value

Description

User Access Type

System Default

Defines which users can access this application. Options: Only Assigned Users, All Users, System Default.

User Group Access Type

System Default

Defines the application’s user group access.

Source Using Type

System Default

Defines which user sources the application can use.

Profile Access Type

System Default

Defines which user profile attributes are available to the application (Options: Restricted, All). Discourse needs the e-mail address, the name and the user name of the user.

After the application is created, click Keys and add a new Access Key for OIDC/OpenID access.

image-20261030-192203.png

Select OIDC/OpenID as the key type and click Create. Monosign generates the Client Id and Client Secret automatically.

discourse-02-key-type.jpg

Configuration details for the Discourse application are provided as follows:

discourse-04-key-details.jpg

Monosign value

Example

Used in Discourse as

Client Id

<client-id>

OpenID Connect client ID

Client Secret

<client-secret>

OpenID Connect client secret

Configuration Url

https://<monosign-host>/.well-known/openid-configuration

OpenID Connect discovery document. Discourse reads the authorization, token, user information and key addresses from this document, so they are not entered one by one.

2- Configuring the OIDC/OpenID Settings on Monosign

Open the Keys tab of the application and click the Configure button of the OpenID Connect (OIDC) key to open the OIDC/OpenID settings.

image-20261031-211438.png

Add the callback address of Discourse to Allowed Redirect URIs, enter the scopes in the Scope field, then press Update.

discourse-03-oidc-settings.jpg

Property

Value

Description

Allowed Redirect URIs

https://<discourse-address>/auth/oidc/callback

The address where Monosign sends the user back after sign-in. Use the public (HTTPS) address of Discourse, exactly as it is written here.

Scope

openid profile email

Enter the three scopes one by one. They must be the same as the authorize scope in Discourse (step 4).

Other fields

Empty / default

The other fields (Issuer, Audience, Resource, token lifetimes, CORS) are not needed.

3- Assign a User to the Discourse Application

Open the application in Monosign, click the Assignments tab and click Assign a User.

image-20261030-193315.png

Search and select the users who can sign in to Discourse, check the Expiration Date and save. You can select more than one user. Every user needs an e-mail address, a name and a user name in Monosign.

image-20261030-193652.png

4- Configuration Single Sign-On for Discourse

As we mentioned at the start, please check out the Discourse documentation first. Log in to Discourse with an administrator account, open Admin → Settings, type openid_connect in the search box, fill in the settings below and wait until each setting is saved.

discourse-05-oidc-config.jpg

Setting

Value

Description

OpenID Connect discovery document

https://<monosign-host>/.well-known/openid-configuration

The Configuration Url of the Monosign key.

OpenID Connect client ID

Client Id

Copied from the Monosign OIDC/OpenID Access Key Details created in the first step.

OpenID Connect client secret

Client Secret

Copied from the same page.

OpenID Connect authorize scope

openid profile email

Scopes that Discourse requests, separated by spaces; they must be the same as in step 2.

OpenID Connect email verified claim fallback

On

Monosign does not send the email_verified claim. If this setting is off, Discourse does not trust the e-mail address and asks the user to activate the account by e-mail.

OpenID Connect match by email

On (default)

Links the Monosign user to an existing Discourse account with the same e-mail address.

OpenID Connect enabled

On

Enable this last, after all other values are entered. It adds the with OpenID Connect button to the login page.

discourse-06-oidc-scope.jpgdiscourse-07-email-verified.jpg

Discourse reads the user from the ID token and the user information endpoint: it needs the claim sub and uses email, name and preferred_username. Discourse must be reachable with HTTPS: set the force https setting and, when Discourse is behind a reverse proxy, make sure the proxy sends X-Forwarded-Proto: https, otherwise the callback address starts with http://. Turn off OpenID Connect verbose logging after the tests.

5- Sign In Test

Now try to log in to Discourse using Monosign SSO. Open a new browser window (or a private window) and type the address of Discourse. Click Log In; the login page shows the with OpenID Connect button.

discourse-08-login-page.jpg
  1. Click the with OpenID Connect button once.

  2. On the Monosign sign-in page log in passwordless with your QR code (Monofor Identity), with a Passkey or with your user name and password (Sign in with Password). If you are already signed in to Monosign, the page is skipped.

  3. After the sign-in Monosign redirects the browser back to Discourse (/auth/oidc/callback). At the first sign-in Discourse shows the Welcome sign-up page with the e-mail address and the user name from Monosign. The e-mail address is marked as authenticated by OpenID Connect. Click Sign Up.

discourse-09-signup.jpg
  1. The user is signed in to Discourse. At the next sign-in the sign-up page is skipped.

discourse-10-signed-in.jpg

Discourse creates the account of a new SSO user as a normal user (trust level 0). Administrator rights are not given by Monosign; an existing Discourse administrator has to give them in Admin → Users.

Troubleshooting

Symptom

Cause

Solution

The with OpenID Connect button is not shown

OpenID Connect enabled is off, or the discovery document, client ID or client secret is empty.

Check step 4 and enable the setting last.

Discourse shows an error and does not go to Monosign

Discourse cannot read the discovery document.

Check that https://<monosign-host>/.well-known/openid-configuration opens from the Discourse server. Turn on verbose logging and read /logs.

Monosign shows a redirect URI error

The callback address does not exactly match the Allowed Redirect URIs, for example because it starts with http://.

Use https://<discourse-address>/auth/oidc/callback (step 2) and make sure Discourse uses HTTPS and the proxy sends X-Forwarded-Proto: https.

An error appears after returning from Monosign

The Client Id or Client Secret is wrong, or Discourse cannot reach Monosign.

Copy the values again from the Monosign access key (step 1) and check that Monosign opens from the Discourse server.

Discourse asks to activate the account with an e-mail after the sign-up

The e-mail address is not trusted because Monosign does not send email_verified.

Turn on OpenID Connect email verified claim fallback (step 4). Accounts that were already created have to be activated by an administrator or deleted and created again.

A user cannot sign in

The user is not assigned to the application.

Assign the user in step 3.

After completing the configuration on Discourse and Monosign, it is better to test in a new private browser window if the OIDC SSO doesn’t work, because old session cookies may cause errors.

Permanent link