fix autologin on fail

This commit is contained in:
2025-01-17 10:18:01 +01:00
parent 7e9fd4b623
commit 16d2503d97
4 changed files with 6 additions and 3 deletions
+1
View File
@@ -78,6 +78,7 @@ export class AuthenticatedGuard implements CanActivate {
return true;
}).catch(function (error) {
if (error instanceof RequestError && (error as RequestError).getResponse().status == 401) {
localStorage.removeItem("bstlboard.autologin");
return that.router.navigateByUrl(that.router.parseUrl('/login?target=' + encodeURIComponent(state.url)), { skipLocationChange: true, replaceUrl: true });
}