fixes for google driver reauth:

- move handler back to replay, reauth should now work
- wabac.js fixes: reauth flow only triggered when reauth is needed, not when exponential backoff is used for loading
- bump version to 1.2.1
This commit is contained in:
Ilya Kreymer
2020-10-24 20:12:39 -07:00
parent 3c77ac93d1
commit 4083b10bd2
6 changed files with 29 additions and 28 deletions
+1 -17
View File
@@ -921,22 +921,6 @@ class Coll extends LitElement
});
}
onReAuthed(event) {
this.reauthWait = (async () => {
const headers = event.detail.headers;
const resp = await fetch(`${this.collInfo.apiPrefix}/updateAuth`, {
method: 'POST',
body: JSON.stringify({headers})
});
if (this.showAuth) {
this.onRefresh(null, true);
this.showAuth = false;
}
})();
}
async onPurgeCache(event) {
event.preventDefault();
@@ -1019,7 +1003,7 @@ class Coll extends LitElement
return q.toString();
}
onRefresh(event, forceReload) {
onRefresh(event) {
if (event) {
event.preventDefault();
}
+17
View File
@@ -13,6 +13,7 @@ class Replay extends LitElement
this.url = "";
this.ts = "";
this.title = "";
this.collInfo = null;
this.showAuth = false;
this.reauthWait = null;
@@ -118,6 +119,22 @@ class Replay extends LitElement
}
}
onReAuthed(event) {
this.reauthWait = (async () => {
const headers = event.detail.headers;
const resp = await fetch(`${this.collInfo.apiPrefix}/updateAuth`, {
method: 'POST',
body: JSON.stringify({headers})
});
if (this.showAuth) {
this.refresh();
this.showAuth = false;
}
})();
}
waitForLoad() {
this.setLoading();
this._loadPoll = window.setInterval(() => {