web-manager 3.0.5 → 3.0.6
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/index.js +20 -13
- package/package.json +1 -1
package/index.js
CHANGED
@@ -287,17 +287,12 @@ function Manager() {
|
|
287
287
|
}
|
288
288
|
}
|
289
289
|
|
290
|
-
|
291
|
-
var returnUrlObject = new URL(decodeURIComponent(url));
|
292
|
-
var currentUrlObject = new URL(window.location.href);
|
293
|
-
return returnUrlObject.host === currentUrlObject.host
|
294
|
-
|| returnUrlObject.protocol === This.properties.global.app + ':'
|
295
|
-
}
|
290
|
+
|
296
291
|
|
297
292
|
function _authHandle_in_normal(This, user) {
|
298
293
|
var domLib = This.dom();
|
299
294
|
var returnUrl = This.properties.page.queryString.get('auth_redirect');
|
300
|
-
if (returnUrl &&
|
295
|
+
if (returnUrl && This.isValidRedirectUrl(returnUrl)) {
|
301
296
|
window.location.href = decodeURIComponent(returnUrl);
|
302
297
|
return;
|
303
298
|
}
|
@@ -636,7 +631,7 @@ function Manager() {
|
|
636
631
|
This.storage().set('auth.affiliateCode', qsAff);
|
637
632
|
}
|
638
633
|
var qsRedirect = pageQueryString.get('redirect');
|
639
|
-
if (qsRedirect &&
|
634
|
+
if (qsRedirect && This.isValidRedirectUrl(qsRedirect)) {
|
640
635
|
window.location.href = decodeURIComponent(qsRedirect);
|
641
636
|
return;
|
642
637
|
}
|
@@ -999,14 +994,19 @@ function Manager() {
|
|
999
994
|
signOut: function() {
|
1000
995
|
// This.log('signOut()');
|
1001
996
|
// var This = this;
|
1002
|
-
firebase.auth().signOut()
|
1003
|
-
.then(function() {
|
1004
|
-
// This.log('signOut success.');
|
1005
|
-
})
|
997
|
+
return firebase.auth().signOut()
|
1006
998
|
.catch(function(e) {
|
1007
999
|
console.error(e);
|
1008
1000
|
// This.log('signOut failed: ', error);
|
1009
1001
|
});
|
1002
|
+
// return firebase.auth().signOut()
|
1003
|
+
// .then(function() {
|
1004
|
+
// // This.log('signOut success.');
|
1005
|
+
// })
|
1006
|
+
// .catch(function(e) {
|
1007
|
+
// // console.error(e);
|
1008
|
+
// // This.log('signOut failed: ', error);
|
1009
|
+
// });
|
1010
1010
|
},
|
1011
1011
|
forgot: function(email) {
|
1012
1012
|
// This.log('forgot()');
|
@@ -1618,7 +1618,7 @@ function Manager() {
|
|
1618
1618
|
// }
|
1619
1619
|
// }
|
1620
1620
|
// }
|
1621
|
-
Manager.prototype.performance = function() {
|
1621
|
+
Manager.prototype.performance = function () {
|
1622
1622
|
return {
|
1623
1623
|
mark: function(mark) {
|
1624
1624
|
try {
|
@@ -1629,6 +1629,13 @@ function Manager() {
|
|
1629
1629
|
}
|
1630
1630
|
}
|
1631
1631
|
|
1632
|
+
Manager.prototype.isValidRedirectUrl = function (url) {
|
1633
|
+
var returnUrlObject = new URL(decodeURIComponent(url));
|
1634
|
+
var currentUrlObject = new URL(window.location.href);
|
1635
|
+
return returnUrlObject.host === currentUrlObject.host
|
1636
|
+
|| returnUrlObject.protocol === This.properties.global.app + ':'
|
1637
|
+
}
|
1638
|
+
|
1632
1639
|
// Manager.prototype.performance = function() {
|
1633
1640
|
// var This = this;
|
1634
1641
|
//
|
package/package.json
CHANGED