Commit 08acaf05 by Li Kui Committed by GitHub

fix: solve the problem of recursive call to logout api (#4265)

1 parent 36e7ca19
...@@ -42,7 +42,9 @@ export async function refreshTokenApi() { ...@@ -42,7 +42,9 @@ export async function refreshTokenApi() {
* 退出登录 * 退出登录
*/ */
export async function logoutApi() { export async function logoutApi() {
return requestClient.post('/auth/logout'); return baseRequestClient.post('/auth/logout', {
withCredentials: true,
});
} }
/** /**
......
...@@ -42,7 +42,9 @@ export async function refreshTokenApi() { ...@@ -42,7 +42,9 @@ export async function refreshTokenApi() {
* 退出登录 * 退出登录
*/ */
export async function logoutApi() { export async function logoutApi() {
return requestClient.post('/auth/logout'); return baseRequestClient.post('/auth/logout', {
withCredentials: true,
});
} }
/** /**
......
...@@ -42,7 +42,9 @@ export async function refreshTokenApi() { ...@@ -42,7 +42,9 @@ export async function refreshTokenApi() {
* 退出登录 * 退出登录
*/ */
export async function logoutApi() { export async function logoutApi() {
return requestClient.post('/auth/logout'); return baseRequestClient.post('/auth/logout', {
withCredentials: true,
});
} }
/** /**
......
...@@ -42,7 +42,9 @@ export async function refreshTokenApi() { ...@@ -42,7 +42,9 @@ export async function refreshTokenApi() {
* 退出登录 * 退出登录
*/ */
export async function logoutApi() { export async function logoutApi() {
return requestClient.post('/auth/logout'); return baseRequestClient.post('/auth/logout', {
withCredentials: true,
});
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!