chore: 优化oidc登录

This commit is contained in:
xiaojunnuo
2025-11-28 01:42:42 +08:00
parent 2fabee647a
commit 21585ca565
17 changed files with 264 additions and 130 deletions
@@ -12,13 +12,13 @@ export async function OauthLogin(type: string) {
});
}
export async function OauthCallback(type: string, query: Record<string, string>) {
export async function OauthToken(type: string, validationCode: string) {
return await request({
url: apiPrefix + `/callback`,
url: apiPrefix + `/token`,
method: "post",
data: {
type,
...query,
validationCode,
},
});
}
@@ -43,3 +43,10 @@ export async function BindUser(code: string) {
},
});
}
export async function GetOauthProviders() {
return await request({
url: apiPrefix + "/providers",
method: "post",
});
}