@livechat/accounts-sdk 2.0.6-beta.8 → 2.0.7
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/accounts-sdk.js +14 -1
- package/dist/accounts-sdk.js.map +1 -1
- package/dist/accounts-sdk.min.js +1 -1
- package/dist/accounts-sdk.min.js.map +1 -1
- package/dist/index.cjs.js +13 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +13 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/accounts-sdk.js
CHANGED
|
@@ -1381,6 +1381,8 @@
|
|
|
1381
1381
|
var params = Object.assign({
|
|
1382
1382
|
expires: 1,
|
|
1383
1383
|
// 1 day
|
|
1384
|
+
// After august 2020 chrome changed iframe cookie policy and without
|
|
1385
|
+
// those parameters cookies wont we stored properly if document is inside iframe.
|
|
1384
1386
|
SameSite: 'none',
|
|
1385
1387
|
Secure: true
|
|
1386
1388
|
}, options);
|
|
@@ -2229,6 +2231,11 @@
|
|
|
2229
2231
|
|
|
2230
2232
|
this.persister = new Persister(options, 'redirect_uri_params');
|
|
2231
2233
|
}
|
|
2234
|
+
/**
|
|
2235
|
+
* Clears query and hash params from redirect_uri and persists them in storage
|
|
2236
|
+
* @param {Object} params
|
|
2237
|
+
*/
|
|
2238
|
+
|
|
2232
2239
|
|
|
2233
2240
|
_createClass(RedirectUriParamsPersister, [{
|
|
2234
2241
|
key: "persist",
|
|
@@ -2242,6 +2249,12 @@
|
|
|
2242
2249
|
});
|
|
2243
2250
|
params.redirect_uri = redirectUrl.origin + redirectUrl.pathname;
|
|
2244
2251
|
}
|
|
2252
|
+
/**
|
|
2253
|
+
* Retrieves persisted query and hash params from storage and updates current location accordingly.
|
|
2254
|
+
* Params returned by global accounts overrides persisted params in case of duplications.
|
|
2255
|
+
* @param {Object} state
|
|
2256
|
+
*/
|
|
2257
|
+
|
|
2245
2258
|
}, {
|
|
2246
2259
|
key: "retrieve",
|
|
2247
2260
|
value: function retrieve(state) {
|
|
@@ -2431,7 +2444,7 @@
|
|
|
2431
2444
|
var flow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2432
2445
|
var localOptions = Object.assign({}, this.options, options);
|
|
2433
2446
|
|
|
2434
|
-
if (!
|
|
2447
|
+
if (!params.state) {
|
|
2435
2448
|
localOptions.state = random.string(localOptions.key_length);
|
|
2436
2449
|
}
|
|
2437
2450
|
|