Skip to content

Commit 9e7feff

Browse files
author
lcx
committed
feat: Add Feishu OAuth login & consumer-grade MCP
1 parent 707d98b commit 9e7feff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/packages/core/src/pages/Login.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ const Login: FC = () => {
153153

154154
// 打开飞书授权页面
155155
const openFeishuLogin = () => {
156-
const href = location.href
157-
const authUrl = `https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id=${feishuAppId}&redirect_uri=${href}`
156+
const href = window.location.origin + window.location.pathname
157+
const authUrl = `https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id=${feishuAppId}&redirect_uri=${encodeURIComponent(href)}`
158158
localStorage.setItem('feishuCallbackUrl', href)
159159
window.location.href = authUrl
160160
}

0 commit comments

Comments
 (0)