File tree Expand file tree Collapse file tree
frontend/packages/core/src/pages Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments