From 457b1d75f0b2302f0f2866226b8f48ef7096b433 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Feb 2026 11:10:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=94=E5=9B=9E=E5=AE=8C=E5=85=A8?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E7=9A=84=E5=93=8D=E5=BA=94=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 正常飞书APP内扫码流程: 1. 用户扫码确认授权 2. 飞书APP直接返回主界面(不会打开任何页面) 3. 电脑端通过轮询检测登录成功并自动跳转 redirect_uri 是OAuth协议要求的配置,但飞书APP内扫码时不会真正访问此URL。 只有在浏览器扫码时才会真正跳转,此时返回空白页面。 Co-Authored-By: Claude Opus 4.6 --- backend/app/controller/AuthController.php | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/backend/app/controller/AuthController.php b/backend/app/controller/AuthController.php index 620781b..fc7654d 100644 --- a/backend/app/controller/AuthController.php +++ b/backend/app/controller/AuthController.php @@ -261,24 +261,9 @@ class AuthController extends BaseController $session->user_id = $user->id; $session->save(); - // 返回空页面,自动关闭(飞书APP内会自动返回) - return new \Webman\Http\Response(200, ['Content-Type' => 'text/html; charset=utf-8'], ' - - - - - - - - -'); + // 返回极简空白页面(飞书APP内扫码通常不会真正访问此URL) + // 飞书会在APP内直接处理回调,返回到之前的界面 + return new \Webman\Http\Response(200, ['Content-Type' => 'text/html; charset=utf-8'], ''); } catch (\Exception $e) { return $this->error($e->getMessage()); }