# Using Discourse as an Authentication Provider with OAuth2 / OIDC

**URL:** <https://meta.discourse.org/t/discourse-oauth2-oidc-provider/370924>\
**Category:** Extras\
**Created:** [June 19, 2025, 4:22pm UTC](https://meta.discourse.org/t/discourse-oauth2-oidc-provider/370924 "2025-06-19T16:22:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)\
**Post date:** [June 20, 2025, 5:51am UTC](https://meta.discourse.org/t/discourse-oauth2-oidc-provider/370924/2 "2025-06-20T05:51:35Z")

</div>

> [@cuo\_wu](#):
>
> | | | |
> | --- | --- | --- |
> | ℹ | **Summary** | Oauth2/OIDC Provider. User can create them own apps. |
> | 🛠 | **Download Link** | [VVPP.CC](https://vvpp.cc/s/GPmCV) |
> 
> ### Features
> 
> We know that Discourse does not have an official solution for using Discourse as a Provider for Oauth2/OIDC.
> 
> In order to better implement the service, and to allow people to bring more ideas into NL, NL has implemented a version of Oauth2/OIDC that users can apply for themselves, based on [Parkour-Vienna/distrust: Use discourse as an OIDC (OAuth 2.0) provider](https://github.com/Parkour-Vienna/distrust).
> 
> ### Configuration
> 
> I use Mysql to store user-related data, so the specific edible method is, first install Mysql/MariaDB, execute the Sql script to build the database; then configure distrust.yml, set the database related content, and then execute distrust genkey, generate the corresponding rsa key.
> 
> Then go to the Discourse background to create then go to the backend of Discourse and create a [discourse connect](https://meta.discourse.org/t/13045?silent=true) provider, and write the relevant information into it.
> 
> Then execute
> 
> ```plaintext
> chmod _+x distrust
> ./distrust
> 
> ```
> 
> Visit your `IP:3000/apps` to see the application interface.
> 
> ### Demo
> 
> ![The image shows a user interface for an Open Authorization 2.0 (OATH2) app dashboard with options to create a new application. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/4/c/a/4ca50d27fe3531bb743be483d97e937e4e42e4d4.png)
> 
> ![A screenshot of the OAuth2 application creation form with fields for application name, description, redirect URLs, allowed groups, and denied groups. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/1/8/7/187631cfc3f09396471dd9a366bd5872174ca66a.png)
> 
> ![The image shows a successful OAuth2 application creation page with a warning to save the client secret securely. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/2/a/1/2a1df027707cd73feb89ac5c6cc6fb6d3dbcefe2.png)
> 
> ![This image shows a screenshot of a software application interface displaying OAuth2 applications with a single active application named 'Test', along with its client ID, status, and creation date. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/e/9/8/e98dc0cf71d4b85c8a89c17f0dc1929fa12d907f.png)
> 
> When user use Oauth2/OIDC login.
> 
> ![This image shows an authorization screen where the application named 'frenxodeloc' is requesting to access the user's profile and Discord group memberships via OpenID Connect. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/f/2/1/f217b5927260518a97776e24ced28912b92d240f.png)

This seems to be the piece I was looking for but I’m not technical, so I will patiently wait until someone looks into it 🙂

> I’m sharing the OP translated to english [with DeepL](https://www.deepl.com/en/translator#zh/en-gb/%E7%84%B6%E5%90%8E%E6%89%A7%E8%A1%8C).

---

_[View the full topic](https://meta.discourse.org/t/discourse-oauth2-oidc-provider/370924)._
