fix: harden auth flows and align api contracts

This commit is contained in:
Your Name
2026-05-30 21:29:24 +08:00
parent 7ad65a0138
commit a332917142
50 changed files with 23594 additions and 723 deletions

View File

@@ -33,14 +33,16 @@ cp configs/oauth_config.example.yaml configs/oauth_config.yaml
# 示例:微信配置
wechat:
enabled: true
app_id: "wx1234567890abcdef"
app_secret: "1234567890abcdef1234567890abcdef"
app_id: "<wechat-app-id>"
app_secret: "<wechat-app-secret>"
# 示例Google配置
google:
enabled: true
client_id: "123456789-abcdef.apps.googleusercontent.com"
client_secret: "GOCSPX-abcdef123456"
client_id: "<google-client-id>"
client_secret: "<google-client-secret>"
```
### 3. 数据库迁移
@@ -290,13 +292,13 @@ Authorization: Bearer <access_token>
```bash
# 微信
WECHAT_OAUTH_ENABLED=true
WECHAT_APP_ID=wx1234567890abcdef
WECHAT_APP_SECRET=1234567890abcdef1234567890abcdef
WECHAT_APP_ID=<wechat-app-id>
WECHAT_APP_SECRET=<wechat-app-secret>
# Google
GOOGLE_OAUTH_ENABLED=true
GOOGLE_CLIENT_ID=123456789-abcdef.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-abcdef123456
GOOGLE_CLIENT_ID=<google-client-id>
GOOGLE_CLIENT_SECRET=<google-client-secret>
# Facebook
FACEBOOK_OAUTH_ENABLED=true