Skip to content

triauth for DiscourseOIDC

Let members sign in to your Discourse forum with one approval on their own device, and no forum passwords.

  • Community
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every self-hosted forum, and the Business and Enterprise hosting plans
Set up in
Admin › Site settings

About Discourse

Discourse is a forum platform for online communities, with long-form discussions in categories and topics, moderation tools, email notifications, and chat. Companies use it for customer communities and support forums, and open-source projects for their public discussions.

Connect Discourse to triauth

Discourse signs people in through the triauth OpenID Connect bridge. Once connected, the sign-in dialog shows a Login with OpenID Connect button. Members click it, type their username, and approve on their own device. Nobody keeps a forum password, and when someone leaves, removing their identity records at your domain ends their access to the forum as well.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste the forum's redirect address, https://forum.example.com/auth/oidc/callback with your own forum address in place of forum.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  2. In the forum's admin area, open Site settings and search for openid_connect. Fill in the settings below with your domain in place of example.com.

    SettingValue
    openid_connect_enabledon
    openid_connect_discovery_documenthttps://oidc.triauth.org/example.com/.well-known/openid-configuration
    openid_connect_client_idthe client ID from the bridge
    openid_connect_client_secretthe client secret from the bridge
    openid_connect_authorize_scopeopenid email profile groups
    openid_connect_groups_claimgroups
  3. Open the forum and click Log In, then Login with OpenID Connect.

Checkpoint

The forum's sign-in dialog shows a Login with OpenID Connect button. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.

Good to know

  • Members who already have a forum account under the same email address are connected to it. Everyone else with an identity at your domain signs up through the new button. To let only one team in, limit the app to a group when you connect it.
  • The groups published at your domain show up in Discourse as associated groups. A forum group can then take its members from them automatically, under its Membership settings.
  • Discourse's own hosting includes this sign-in option on its Business and Enterprise plans.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-forum>/auth/oidc/callback, without a trailing slash
Where in DiscourseAdmin › Site settings, search openid_connect. The plugin ships with Discourse and is off by default
Discovery documenthttps://oidc.triauth.org/<your domain>/.well-known/openid-configuration
Groupsopenid_connect_groups_claim set to groups, then Membership › Automatic in each forum group
Without a secretif you ticked This app can't keep a secret on the bridge, tick openid_connect_use_pkce and leave the secret empty

Discourse's OpenID Connect guide explains every setting, including user field mappings.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.