@schibsted/account-sdk-browser 4.8.7-beta.2 → 4.8.7-beta.4
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/README.md +4 -0
- package/es5/global.js +10 -8
- 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 +10 -8
- 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 +10 -8
- 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.d.ts +0 -5
- package/src/identity.js +7 -4
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/identity.d.ts
CHANGED
|
@@ -558,11 +558,6 @@ export type HasSessionSuccessResponse = {
|
|
|
558
558
|
* - (Only for connected users)
|
|
559
559
|
*/
|
|
560
560
|
defaultAgreementAccepted: boolean;
|
|
561
|
-
} | {
|
|
562
|
-
/**
|
|
563
|
-
* Used for expiring session in Safari browser to indicate redirection need
|
|
564
|
-
*/
|
|
565
|
-
redirectURL: string;
|
|
566
561
|
};
|
|
567
562
|
export type HasSessionFailureResponse = {
|
|
568
563
|
error: {
|
package/src/identity.js
CHANGED
|
@@ -530,14 +530,12 @@ export class Identity extends EventEmitter {
|
|
|
530
530
|
throw err;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
if(sessionData){
|
|
533
|
+
if (sessionData){
|
|
534
534
|
// for expiring session and safari browser do full page redirect to gain new session
|
|
535
535
|
if(_checkRedirectionNeed(sessionData)){
|
|
536
536
|
await this.callbackBeforeRedirect();
|
|
537
537
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
return;
|
|
538
|
+
return this._sessionService.makeUrl(sessionData.redirectURL);
|
|
541
539
|
}
|
|
542
540
|
|
|
543
541
|
if (this._enableSessionCaching) {
|
|
@@ -552,6 +550,11 @@ export class Identity extends EventEmitter {
|
|
|
552
550
|
.then(
|
|
553
551
|
sessionData => {
|
|
554
552
|
this._hasSessionInProgress = false;
|
|
553
|
+
|
|
554
|
+
if (typeof sessionData === 'string' && isUrl(sessionData)) {
|
|
555
|
+
return this.window.location.href = sessionData;
|
|
556
|
+
}
|
|
557
|
+
|
|
555
558
|
return sessionData;
|
|
556
559
|
},
|
|
557
560
|
err => {
|
package/src/version.js
CHANGED