diff --git a/apps/web-antd/src/api/core/auth.ts b/apps/web-antd/src/api/core/auth.ts index 779bca1c..a40ff0a1 100644 --- a/apps/web-antd/src/api/core/auth.ts +++ b/apps/web-antd/src/api/core/auth.ts @@ -42,7 +42,9 @@ export async function refreshTokenApi() { * 退出登录 */ export async function logoutApi() { - return requestClient.post('/auth/logout'); + return baseRequestClient.post('/auth/logout', { + withCredentials: true, + }); } /** diff --git a/apps/web-ele/src/api/core/auth.ts b/apps/web-ele/src/api/core/auth.ts index 779bca1c..a40ff0a1 100644 --- a/apps/web-ele/src/api/core/auth.ts +++ b/apps/web-ele/src/api/core/auth.ts @@ -42,7 +42,9 @@ export async function refreshTokenApi() { * 退出登录 */ export async function logoutApi() { - return requestClient.post('/auth/logout'); + return baseRequestClient.post('/auth/logout', { + withCredentials: true, + }); } /** diff --git a/apps/web-naive/src/api/core/auth.ts b/apps/web-naive/src/api/core/auth.ts index 779bca1c..a40ff0a1 100644 --- a/apps/web-naive/src/api/core/auth.ts +++ b/apps/web-naive/src/api/core/auth.ts @@ -42,7 +42,9 @@ export async function refreshTokenApi() { * 退出登录 */ export async function logoutApi() { - return requestClient.post('/auth/logout'); + return baseRequestClient.post('/auth/logout', { + withCredentials: true, + }); } /** diff --git a/playground/src/api/core/auth.ts b/playground/src/api/core/auth.ts index 779bca1c..a40ff0a1 100644 --- a/playground/src/api/core/auth.ts +++ b/playground/src/api/core/auth.ts @@ -42,7 +42,9 @@ export async function refreshTokenApi() { * 退出登录 */ export async function logoutApi() { - return requestClient.post('/auth/logout'); + return baseRequestClient.post('/auth/logout', { + withCredentials: true, + }); } /**