From 03d376dae02c0ce679d5b538b800c2116bda8782 Mon Sep 17 00:00:00 2001 From: FlayInAHook Date: Thu, 3 Dec 2020 12:11:21 +0100 Subject: [PATCH] removed auto logout --- src/app/helper/token.interceptor.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/helper/token.interceptor.ts b/src/app/helper/token.interceptor.ts index 0788af4..025a268 100644 --- a/src/app/helper/token.interceptor.ts +++ b/src/app/helper/token.interceptor.ts @@ -28,11 +28,12 @@ export class TokenInterceptor implements HttpInterceptor { errorMessage = `Error: ${error.error.message}`; } else { //server error - if (error.status === 400){ + /*if (error.status === 400){ this.authService.logout(); errorMessage = "Die aktuelle Sitzung ist abgelaufen. Bitte loggen sie sich erneut ein." this.router.navigate(["/login"], { queryParams: { returnUrl: this.router.routerState.snapshot.url } }); - } else if (error.status === 401) { + } else*/ + if (error.status === 401) { var urlSplit : string[] = error.url.split("/"); if (urlSplit[3] === "users" && urlSplit[5] === "update"){ // Allow user pw updates to be processed correctly errorMessage = "Das aktuelle Passwort ist inkorrekt.";