Установите этот плагин для включения OAuth2
GitHub - discourse/discourse-oauth2-basic: A basic OAuth2 plugin for use with Discourse · GitHub
Создайте приложение в Mastodon
Название приложения: Discourse Login
Веб-сайт приложения: https://<YOUR_DISCOURSE>/auth/oauth2_basic/callback
URI перенаправления: https://<YOUR_DISCOURSE>/auth/oauth2_basic/callback
Настройте плагин OAuth2 в Discourse
oauth2 client id: Ключ клиента вашего приложения Mastodon
oauth2 client secret: Секретный ключ клиента вашего приложения Mastodon
oauth2 authorize url: https://<YOUR_MASTODON>/oauth/authorize
oauth2 token url: https://<YOUR_MASTODON>/oauth/token
oauth2 user json url: https://<YOUR_MASTODON>/api/v1/accounts/verify_credentials
oauth2 json user id path: id
oauth2 json username path: username
oauth2 json name path: display_name
oauth2 json avatar path: avatar
Связанная тема:
Summary
Discourse OAuth2 Basic supports basic OAuth2 providers, assuming they have a JSON API endpoint where user details can be retrieved by token.
Install Guide
This plugin is bundled with Discourse core. There is no need to install the plugin separately.
Features
This plugin allows you to use a basic OAuth2 provider as authentication for Discourse. It should work with many providers, with the caveat that they must provide a JSON endpoint for retri…
If you are using Auth0 as your identity provider this guide will show you how to setup authentication using the Discourse OAuth2 Basic Plugin .
Initial Steps
Create an Auth0 account if you don’t already have one
The Discourse OAuth2 Basic Plugin ships pre-installed with Discourse. If you are self-hosted, ensure the plugin is enabled. For hosted plans , the plugin is available on Business tier and above.
Configure Auth0
Applications → Create Application
Give your client a name like “Discourse…