From 9e7feff0939dc51d0bc5225a95f83edaab823616 Mon Sep 17 00:00:00 2001 From: lcx Date: Thu, 17 Jul 2025 16:32:29 +0800 Subject: [PATCH 1/2] feat: Add Feishu OAuth login & consumer-grade MCP --- frontend/packages/core/src/pages/Login.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/packages/core/src/pages/Login.tsx b/frontend/packages/core/src/pages/Login.tsx index 96a3a359..0c1b5b62 100644 --- a/frontend/packages/core/src/pages/Login.tsx +++ b/frontend/packages/core/src/pages/Login.tsx @@ -153,8 +153,8 @@ const Login: FC = () => { // 打开飞书授权页面 const openFeishuLogin = () => { - const href = location.href - const authUrl = `https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id=${feishuAppId}&redirect_uri=${href}` + const href = window.location.origin + window.location.pathname + const authUrl = `https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id=${feishuAppId}&redirect_uri=${encodeURIComponent(href)}` localStorage.setItem('feishuCallbackUrl', href) window.location.href = authUrl } From 6ced12af755b6ec5bca8af56765cd93ae9ae29eb Mon Sep 17 00:00:00 2001 From: lcx Date: Thu, 17 Jul 2025 16:34:51 +0800 Subject: [PATCH 2/2] feat: Add Feishu OAuth login & consumer-grade MCP --- frontend/packages/core/src/pages/Login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/core/src/pages/Login.tsx b/frontend/packages/core/src/pages/Login.tsx index 0c1b5b62..d4b6415d 100644 --- a/frontend/packages/core/src/pages/Login.tsx +++ b/frontend/packages/core/src/pages/Login.tsx @@ -154,7 +154,7 @@ const Login: FC = () => { // 打开飞书授权页面 const openFeishuLogin = () => { const href = window.location.origin + window.location.pathname - const authUrl = `https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id=${feishuAppId}&redirect_uri=${encodeURIComponent(href)}` + const authUrl = `https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id=${feishuAppId}&redirect_uri=${href}` localStorage.setItem('feishuCallbackUrl', href) window.location.href = authUrl }