From d24c51e1cde53b7d651ab4295f0790d28a5fb618 Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Thu, 28 May 2020 14:30:56 +0200 Subject: [PATCH] 71201: #678 Angular UI does not properly logout when clicking logout --- src/app/core/auth/auth.interceptor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/auth/auth.interceptor.ts b/src/app/core/auth/auth.interceptor.ts index bf11d00ccd..f4e7aa2fd3 100644 --- a/src/app/core/auth/auth.interceptor.ts +++ b/src/app/core/auth/auth.interceptor.ts @@ -221,7 +221,7 @@ export class AuthInterceptor implements HttpInterceptor { // Redirect to the login route this.store.dispatch(new RedirectWhenTokenExpiredAction('auth.messages.expired')); return observableOf(null); - } else if (!this.isAuthRequest(req) && isNotEmpty(token)) { + } else if ((!this.isAuthRequest(req) || this.isLogoutResponse(req)) && isNotEmpty(token)) { // Intercept a request that is not to the authentication endpoint authService.isTokenExpiring().pipe( filter((isExpiring) => isExpiring))