feat(auth): 统一身份 - 增加可选IAM快捷登录并保留原业务权限

This commit is contained in:
2026-09-10 10:33:03 +08:00
parent 27fbef9321
commit aa0d22bbe2
518 changed files with 5919 additions and 13 deletions
+13
View File
@@ -45,3 +45,16 @@ export function unbindWorkWechat() {
export function changeFirstPassword(params: { password: string; password_confirm: string }) {
return request.post({ url: '/login/changeFirstPassword', params })
}
// 统一账号登录开关和服务器生成的固定登录入口
export function getIamConfig() {
return request.get({ url: '/iam/config' }, { withToken: false })
}
// 浏览器绑定的一次性兑换码;不重试,也不将旧业务 token 带入认证
export function iamLogin(ticket: string) {
return request.post(
{ url: '/iam/exchange', params: { ticket, terminal: config.terminal }, withCredentials: true },
{ withToken: false, isOpenRetry: false }
)
}