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:
+1
-17
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user