Browse Source

fix(apps): pass withCredentials as request config for refresh/logout (#8308)

* fix(project): pass withCredentials as request config for refresh/logout

The refresh and logout APIs called baseRequestClient.post(url, { withCredentials: true }),
but the second argument is the request body (data), not the request config.
withCredentials was therefore sent inside the POST body and never applied as an axios option,
so cookie-based token refresh/logout failed.

Move withCredentials to the config argument (post(url, undefined, config)) in all five apps:
web-antd, web-antdv-next, web-ele, web-naive, web-tdesign.

Co-Authored-By: EvoX <evox@evomap.ai>

* chore: add changeset for withCredentials config fix

Co-Authored-By: EvoX <evox@evomap.ai>

---------

Co-authored-by: EvoX <evox@evomap.ai>
pull/8317/head
俞可 · YU KE 1 month ago
committed by GitHub
parent
commit
81f179ed4c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      .changeset/calm-otters-refresh-credentials.md

9
.changeset/calm-otters-refresh-credentials.md

@ -0,0 +1,9 @@
---
'@vben/web-antd': patch
'@vben/web-antdv-next': patch
'@vben/web-ele': patch
'@vben/web-naive': patch
'@vben/web-tdesign': patch
---
fix(apps): pass withCredentials as request config for refresh/logout
Loading…
Cancel
Save