fix: 移除硬编码的开发环境域名

- 使用动态域名配置(从 request 或 config 读取)
- 添加 FEISHU_BASE_URL 环境变量支持
- 修复回调地址为当前站点域名

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-27 22:12:46 +08:00
parent 3b5107d4cd
commit 103da81a5c
4 changed files with 10 additions and 6 deletions
+2 -1
View File
@@ -287,7 +287,8 @@ class AuthController extends BaseController
]);
// 构建扫码登录 URL
$redirectUri = urlencode("https://xsm.dev.hnxinyouhe.com/login/callback");
$baseUrl = config('feishu_notification.base_url') ?? request()->scheme() . '://' . request()->host();
$redirectUri = urlencode($baseUrl . '/login/callback');
$authUrl = "https://passport.feishu.cn/suite/passport/oauth/authorize?client_id={$feishuApp->app_id}&redirect_uri={$redirectUri}&response_type=code&state={$loginSession->id}";
error_log("✅ 生成二维码会话: session_id={$loginSession->id}");