fix: update callback URLs to include MaxKB prefix
This commit is contained in:
parent
5ab5ab71a5
commit
873d4af46b
@ -392,7 +392,7 @@ const open = async (id: string, type: PlatformType) => {
|
|||||||
MsgError(t('views.application.tip.loadingErrorMessage'))
|
MsgError(t('views.application.tip.loadingErrorMessage'))
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
form[configType.value].callback_url = `${window.location.origin}/api/chat/${type}/${id}`
|
form[configType.value].callback_url = `${window.location.origin}${window.MaxKB.prefix}/api/chat/${type}/${id}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ const initActive = async () => {
|
|||||||
appSecret: props.config.app_secret
|
appSecret: props.config.app_secret
|
||||||
}
|
}
|
||||||
|
|
||||||
const redirectUrl = encodeURIComponent(`${window.location.origin}/api/lark`)
|
const redirectUrl = encodeURIComponent(`${window.location.origin}${window.MaxKB.prefix}/api/lark`)
|
||||||
const url = `https://passport.feishu.cn/suite/passport/oauth/authorize?client_id=${data.agentId}&redirect_uri=${redirectUrl}&response_type=code&state=fit2cloud-lark-qr`
|
const url = `https://passport.feishu.cn/suite/passport/oauth/authorize?client_id=${data.agentId}&redirect_uri=${redirectUrl}&response_type=code&state=fit2cloud-lark-qr`
|
||||||
const QRLoginObj = window.QRLogin({
|
const QRLoginObj = window.QRLogin({
|
||||||
id: 'lark-qr',
|
id: 'lark-qr',
|
||||||
|
|||||||
@ -154,7 +154,7 @@ const open = async (platform: Platform) => {
|
|||||||
Object.assign(currentPlatform, platform)
|
Object.assign(currentPlatform, platform)
|
||||||
|
|
||||||
// 设置默认的 callback_url
|
// 设置默认的 callback_url
|
||||||
const defaultCallbackUrl = window.location.origin
|
const defaultCallbackUrl = window.location.origin + window.MaxKB.prefix
|
||||||
switch (platform.key) {
|
switch (platform.key) {
|
||||||
case 'wecom':
|
case 'wecom':
|
||||||
if (currentPlatform.config.app_key) {
|
if (currentPlatform.config.app_key) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user