fix(auth): add timestamp in URL to prevent infinite redirection loop

This commit is contained in:
Pierre 2022-05-10 09:46:42 +02:00
parent bf2fcc6641
commit 98b460d6fe

View File

@ -17,6 +17,9 @@ export default {
};
},
created: function () {
if (/t=\d+/.test(window.location.href)) {
window.history.replaceState({}, document.title, window.location.pathname);
}
let that = this;
this.checkOffline();
@ -61,7 +64,7 @@ export default {
.then(function (response) {
// opaqueredirect means request has been redirected, to auth provider probably
if (response.type === "opaqueredirect" && !response.ok) {
window.location.reload(true);
window.location.href = window.location.href + "?t="+(new Date().valueOf());
}
that.offline = !response.ok;
})