Skip to content

Commit 707d98b

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

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ const Login: FC = () => {
3434
const feishuLogin = async (feishuCode: string) => {
3535
try {
3636
setLoading(true)
37+
const feishuCallbackUrl = localStorage.getItem('feishuCallbackUrl')
3738
const { code, msg } = await fetchData<BasicResponse<null>>('account/login/feishu', {
3839
method: 'POST',
3940
eoBody: {
40-
code: feishuCode
41+
code: feishuCode,
42+
redirect_uri: feishuCallbackUrl
4143
}
4244
})
4345

@@ -153,6 +155,7 @@ const Login: FC = () => {
153155
const openFeishuLogin = () => {
154156
const href = location.href
155157
const authUrl = `https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id=${feishuAppId}&redirect_uri=${href}`
158+
localStorage.setItem('feishuCallbackUrl', href)
156159
window.location.href = authUrl
157160
}
158161

0 commit comments

Comments
 (0)