This commit is contained in:
Timothy Jaeryang Baek committed 2026-04-24 16:17:46 +09:00
1 parent 5cc55e2278
commit 678c44c7cd
12 files changed
+268 -76

No files matched your search

+30
View File
@@ -712,3 +712,33 @@ export const deleteAPIKey = async (token: string) => {
}
return res;
};
export const deleteOAuthSession = async (token: string, provider: string) => {
let error = null;
const res = await fetch(
`${WEBUI_API_BASE_URL}/auths/oauth/sessions/${encodeURIComponent(provider)}`,
{
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
}
}
)
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
console.error(err);
error = err.detail;
return null;
});
if (error) {
throw error;
}
return res;
};