feat(auth): handle unauthorized request in connectivity

Reload page without cache if 401 and 403 status in response
This commit is contained in:
Pierre 2022-05-16 14:52:46 +02:00
parent 98b460d6fe
commit 4353f5e036

View File

@ -63,7 +63,7 @@ export default {
})
.then(function (response) {
// opaqueredirect means request has been redirected, to auth provider probably
if (response.type === "opaqueredirect" && !response.ok) {
if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) {
window.location.href = window.location.href + "?t="+(new Date().valueOf());
}
that.offline = !response.ok;