From 4712cc4446fa8c7e7ca6581993762f7365254291 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Feb 2026 00:28:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E9=A3=9E=E4=B9=A6?= =?UTF-8?q?=E6=8E=88=E6=9D=83scope=E5=8F=82=E6=95=B0=E5=B9=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scope参数设置为必需的权限范围 - 添加授权URL日志输出便于调试 Co-Authored-By: Claude Opus 4.6 --- frontend/src/pages/login/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/login/index.tsx b/frontend/src/pages/login/index.tsx index d0e2a0d..21dd059 100644 --- a/frontend/src/pages/login/index.tsx +++ b/frontend/src/pages/login/index.tsx @@ -29,9 +29,13 @@ export default function Login() { const redirectUri = encodeURIComponent('https://xsm.dev.hnxinyouhe.com/login') // 租户密钥(新友合公司) const tenantKey = '14e7bc0fe5985740' + // 请求权限范围 + const scope = encodeURIComponent('email:readonly phone:readonly contact:readonly avatar:readonly') // 构建飞书授权 URL - const authUrl = `https://open.feishu.cn/open-apis/authen/v1/oidc/authorize?app_id=${appId}&redirect_uri=${redirectUri}&scope=&state=${tenantKey}` + const authUrl = `https://open.feishu.cn/open-apis/authen/v1/oidc/authorize?app_id=${appId}&redirect_uri=${redirectUri}&scope=${scope}&state=${tenantKey}` + + console.log('飞书授权 URL:', authUrl) // 跳转到飞书授权页面 window.location.href = authUrl