fix: 添加飞书授权scope参数并增加调试日志

- scope参数设置为必需的权限范围
- 添加授权URL日志输出便于调试

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-26 00:28:34 +08:00
parent fd48d35f8c
commit 4712cc4446
+5 -1
View File
@@ -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