From 98b460d6fe0e09cbdbf37f882f5e5bf7daa48e73 Mon Sep 17 00:00:00 2001 From: Pierre <397503+bemble@users.noreply.github.com> Date: Tue, 10 May 2022 09:46:42 +0200 Subject: [PATCH] fix(auth): add timestamp in URL to prevent infinite redirection loop --- src/components/ConnectivityChecker.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue index a717bcf..1c677d2 100644 --- a/src/components/ConnectivityChecker.vue +++ b/src/components/ConnectivityChecker.vue @@ -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; }) -- 2.41.0