Implement comprehensive authentication and authorization system with Discourse SSO integration

This commit is contained in:
wood chen 2025-02-08 01:26:13 +08:00
parent e30d12a7e5
commit f4e7d16c90
3 changed files with 807 additions and 198 deletions

10
.env.example Normal file
View File

@ -0,0 +1,10 @@
# Discourse SSO 配置
# Discourse 网站地址
DISCOURSE_URL=https://discourse.example.com
# SSO 密钥 (必需)
# 可以使用以下命令生成: openssl rand -hex 32
DISCOURSE_SSO_SECRET=your_sso_secret_here
# 服务器配置
PORT=8000

30
.gitignore vendored
View File

@ -1 +1,31 @@
kaifa.md
# 环境变量配置
.env
.env.local
.env.*.local
# 系统文件
.DS_Store
Thumbs.db
# IDE 配置
.idea/
.vscode/
*.sublime-project
*.sublime-workspace
# 依赖目录
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# 构建输出
dist/
build/
out/
# 日志文件
*.log
logs/

965
main.ts

File diff suppressed because it is too large Load Diff