perf: 支持oidc单点登录

This commit is contained in:
xiaojunnuo
2025-11-27 01:59:22 +08:00
parent c7b298c46f
commit ec75afbc44
25 changed files with 633 additions and 103 deletions
@@ -0,0 +1,45 @@
import { request } from "/src/api/service";
const apiPrefix = "/oauth";
export async function OauthLogin(type: string) {
return await request({
url: apiPrefix + `/login`,
method: "post",
data: {
type,
},
});
}
export async function OauthCallback(type: string, query: Record<string, string>) {
return await request({
url: apiPrefix + `/callback`,
method: "post",
data: {
type,
...query,
},
});
}
export async function AutoRegister(type: string, code: string) {
return await request({
url: apiPrefix + `/autoRegister`,
method: "post",
data: {
validationCode: code,
type,
},
});
}
export async function BindUser(code: string) {
return await request({
url: apiPrefix + `/bind`,
method: "post",
data: {
validationCode: code,
},
});
}