feat(auth): 重构认证逻辑,支持 HttpOnly Cookie 登录;移除不再使用的 Token 存储方式
Some checks failed
lotteryadmin CI / build (push) Has been cancelled

This commit is contained in:
2026-06-30 11:41:57 +08:00
parent ba77dc1f5a
commit 6e248207ff
16 changed files with 193 additions and 118 deletions

View File

@@ -125,3 +125,11 @@ export const adminRequest = {
config?: Omit<AxiosRequestConfig, "url" | "method" | "data">,
) => request<T>({ ...config, url, method: "PUT", data }),
};
export async function clearAdminSessionCookie(): Promise<void> {
await adminHttp.request({
url: "/admin/auth/logout",
method: "POST",
validateStatus: () => true,
});
}