eservices-core 1.0.573 → 1.0.574
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.574
|
|
3
3
|
* (c) 2023 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -2226,12 +2226,18 @@ function Request(url, params = {}) {
|
|
|
2226
2226
|
// @ts-ignore
|
|
2227
2227
|
params.headers["Context-Id"] = Manager.contextId;
|
|
2228
2228
|
}
|
|
2229
|
-
params.redirect = "
|
|
2229
|
+
params.redirect = "manual";
|
|
2230
2230
|
return fetch(url, params)
|
|
2231
|
+
.then(res => {
|
|
2232
|
+
if (res.type === 'opaqueredirect') {
|
|
2233
|
+
return void window.location.replace('/auth');
|
|
2234
|
+
}
|
|
2235
|
+
return res;
|
|
2236
|
+
})
|
|
2231
2237
|
.catch(() => {
|
|
2232
2238
|
throw CoreError.ApiNotAvailable();
|
|
2233
2239
|
})
|
|
2234
|
-
.then(res => {
|
|
2240
|
+
.then((res) => {
|
|
2235
2241
|
return parseData(res)
|
|
2236
2242
|
.then(data => {
|
|
2237
2243
|
if (!res.ok)
|