This plugin allows users to log in to your Discourse forum using Gitee OAuth2.
Installation
- Clone the code into the plugins directory
/var/www/discourse/pluginsdocker exec -it discourse-web-1 bash cd /var/www/discourse/plugins git clone https://github.com/xuxiaowei-com-cn/discourse-gitee-login.git - Restart the container
docker restart discourse-web-1
Configuration
-
Create a new OAuth application on Gitee:
- Visit Gitee OAuth Applications
- Click “Create Application”
- Fill in the required fields:
- Application Name: Your forum name
- Application Description: Your forum description
- Application Homepage: Your forum URL
- Authorized Redirect URI:
https://your-forum-url/auth/gitee/callback(Replaceyour-forum-urlwith your forum domain)
- Click “Create Application”
-
Copy the
Client IDandClient Secretfrom the Gitee application page. -
In your Discourse Admin Panel:
- Go to
Settings→Plugins→Gitee Login - Enable the
gitee_login_enabledsetting - Enter the
Client IDandClient Secretyou copied from Gitee - Customize
gitee_login_button_titleas needed - Click “Save Changes”
- Go to
Usage
Once configured, users will see a “Log in with Gitee” button on the login page. They can click this button to authenticate with their Gitee account and log in to your forum.

