disable authinprogress for now

This commit is contained in:
zeppi 2021-01-11 18:34:48 -05:00
parent 65709e1139
commit ae032cb557

View file

@ -93,25 +93,26 @@ export function doInstallNewWithParams(
function checkAuthBusy() { function checkAuthBusy() {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
(function waitForAuth() { (function waitForAuth() {
try { // try {
sessionStorage.setItem('test', 'available'); // sessionStorage.setItem('test', 'available');
sessionStorage.removeItem('test'); // sessionStorage.removeItem('test');
sessionStorageAvailable = true; // sessionStorageAvailable = true;
} catch (e) { // } catch (e) {
if (e) { // if (e) {
// no session storage // // no session storage
} // }
} // }
if (!IS_WEB || !sessionStorageAvailable) { // if (!IS_WEB || !sessionStorageAvailable) {
// return resolve();
// }
// const inProgress = window.sessionStorage.getItem(AUTH_IN_PROGRESS);
// if (!inProgress) {
// window.sessionStorage.setItem(AUTH_IN_PROGRESS, 'true');
// return resolve();
// } else {
// setTimeout(waitForAuth, 200);
// }
return resolve(); return resolve();
}
const inProgress = window.sessionStorage.getItem(AUTH_IN_PROGRESS);
if (!inProgress) {
window.sessionStorage.setItem(AUTH_IN_PROGRESS, 'true');
return resolve();
} else {
setTimeout(waitForAuth, 200);
}
})(); })();
}); });
} }