fix autologin on fail
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user