@schibsted/account-sdk-browser 4.8.7-beta.5 → 4.8.7-beta.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/es5/global.js +9 -6
- package/es5/global.js.map +1 -1
- package/es5/global.min.js +1 -1
- package/es5/global.min.js.map +1 -1
- package/es5/identity.js +9 -6
- package/es5/identity.js.map +1 -1
- package/es5/identity.min.js +1 -1
- package/es5/identity.min.js.map +1 -1
- package/es5/index.js +9 -6
- package/es5/index.js.map +1 -1
- package/es5/index.min.js +1 -1
- package/es5/index.min.js.map +1 -1
- package/es5/monetization.js +1 -1
- package/es5/monetization.js.map +1 -1
- package/es5/monetization.min.js +1 -1
- package/es5/monetization.min.js.map +1 -1
- package/package.json +1 -1
- package/src/identity.js +6 -2
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/identity.js
CHANGED
|
@@ -188,10 +188,10 @@ export class Identity extends EventEmitter {
|
|
|
188
188
|
this.log = log;
|
|
189
189
|
this.callbackBeforeRedirect = callbackBeforeRedirect;
|
|
190
190
|
this._sessionDomain = sessionDomain;
|
|
191
|
-
this.cache.set("sessionFlowOngoing", false);
|
|
192
191
|
|
|
193
192
|
// Internal hack: set to false to always refresh from hassession
|
|
194
193
|
this._enableSessionCaching = true;
|
|
194
|
+
this.cache.delete("sessionFlowOngoing");
|
|
195
195
|
|
|
196
196
|
// Old session
|
|
197
197
|
this._session = {};
|
|
@@ -540,7 +540,11 @@ export class Identity extends EventEmitter {
|
|
|
540
540
|
if (sessionData){
|
|
541
541
|
// for expiring session and safari browser do full page redirect to gain new session
|
|
542
542
|
if(_checkRedirectionNeed(sessionData)){
|
|
543
|
-
this.
|
|
543
|
+
if (this._enableSessionCaching) {
|
|
544
|
+
const expiresIn = 1000 * (sessionData.expiresIn || 300);
|
|
545
|
+
this.cache.set("sessionFlowOngoing", true, expiresIn);
|
|
546
|
+
}
|
|
547
|
+
|
|
544
548
|
await this.callbackBeforeRedirect();
|
|
545
549
|
|
|
546
550
|
return this._sessionService.makeUrl(sessionData.redirectURL);
|
package/src/version.js
CHANGED