Browse Source
fix: solve the problem of recursive call to logout api (#4265)
pull/4267/head
Li Kui
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
12 additions and
4 deletions
-
apps/web-antd/src/api/core/auth.ts
-
apps/web-ele/src/api/core/auth.ts
-
apps/web-naive/src/api/core/auth.ts
-
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, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
@ -42,7 +42,9 @@ export async function refreshTokenApi() { |
|
|
|
* 退出登录 |
|
|
|
*/ |
|
|
|
export async function logoutApi() { |
|
|
|
return requestClient.post('/auth/logout'); |
|
|
|
return baseRequestClient.post('/auth/logout', { |
|
|
|
withCredentials: true, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
@ -42,7 +42,9 @@ export async function refreshTokenApi() { |
|
|
|
* 退出登录 |
|
|
|
*/ |
|
|
|
export async function logoutApi() { |
|
|
|
return requestClient.post('/auth/logout'); |
|
|
|
return baseRequestClient.post('/auth/logout', { |
|
|
|
withCredentials: true, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
@ -42,7 +42,9 @@ export async function refreshTokenApi() { |
|
|
|
* 退出登录 |
|
|
|
*/ |
|
|
|
export async function logoutApi() { |
|
|
|
return requestClient.post('/auth/logout'); |
|
|
|
return baseRequestClient.post('/auth/logout', { |
|
|
|
withCredentials: true, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|