fix(ui): include credentials for fetch request to address the refresh token issue (#2113)
This commit is contained in:
parent
e8ccfbb2b3
commit
1fe2e5afe3
1 changed files with 6 additions and 0 deletions
|
|
@ -154,6 +154,12 @@ export default class APIClient {
|
|||
edp = `${edp}/${this.siteId}`;
|
||||
}
|
||||
|
||||
if (path.includes('login') || path.includes('refresh') || path.includes('logout')) {
|
||||
init.credentials = 'include';
|
||||
} else {
|
||||
delete init.credentials;
|
||||
}
|
||||
|
||||
return fetch(edp + path, init).then((response) => {
|
||||
if (response.ok) {
|
||||
return response;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue