mirror of
https://github.com/certd/certd.git
synced 2026-05-17 13:57:31 +08:00
chore: 优化oidc登录
This commit is contained in:
@@ -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",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user