fix(ui): include credentials for fetch request to address the refresh token issue
This commit is contained in:
parent
52d5127d8d
commit
394b5ea404
1 changed files with 6 additions and 0 deletions
|
|
@ -160,6 +160,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