Skip to content

Commit

Permalink
frontend: prevent getting logged out in developement when backend is …
Browse files Browse the repository at this point in the history
…restarting.
  • Loading branch information
ffreddow committed Nov 5, 2024
1 parent 628788e commit 4d4db40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export async function refresh_access_token() {
localStorage.removeItem("loginKey");
}

if (resp.status == 200) {
// prevent loggin out in developement when backend is restarting
if (resp.status == 200 || resp.status == 502) {
if (!localStorage.getItem("loginSalt") || !localStorage.getItem("secretKey")) {
logout(false);
}
Expand Down

0 comments on commit 4d4db40

Please sign in to comment.