Настройте ваш Discourse как провайдера OAuth2/OIDC

:information_source: Summary Oauth2/OIDC Provider. Users can create their own apps.
:hammer_and_wrench: Download Link https://vvpp.cc/s/GPmCV

Features

We know that Discourse officially does not use Discourse as a solution for an Oauth2/OIDC Provider.

To better implement the service and to allow everyone to bring more creativity into NL, NL has implemented an Oauth2/OIDC Provider based on Parkour-Vienna/distrust: Use discourse as an OIDC (OAuth 2.0) provider, which allows users to apply for applications themselves.

Configuration

I used Mysql to store user-related data, so the specific usage method is to first install Mysql/MariaDB, execute the Sql script to create the database; then configure distrust.yml, set the database-related content, and then execute distrust genkey to generate the corresponding rsa key; then create a discourse connect provider in the Discourse backend and enter the relevant information.

Then execute

chmod _+x distrust
./distrust

Access your IP:3000/apps to see the application interface.

Demo

When user use Oauth2/OIDC login.

5 лайков

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 :slight_smile:

I’m sharing the OP translated to english with DeepL.

1 лайк

An excellent beginning; I am grateful for your open-source contribution. This truly marks a magnificent commencement. :clap: :clap: :clap:

cool!

./distrust

версия MySQL: 9.0.1

ошибка:

FTL не удалось инициализировать базу данных, ошибка = «не удалось выполнить миграцию базы данных: не удалось создать уникальный индекс: Ошибка 1064 (42000): Синтаксическая ошибка в SQL-запросе; обратитесь к руководству, соответствующему версии вашего сервера MySQL, чтобы узнать правильный синтаксис для использования вблизи «IF NOT EXISTS idx_user_authorizations_user_client \n\t\tON user_authorizations(user» на строке 1»