71201: #678 Angular UI does not properly logout when clicking logout

This commit is contained in:
Yana De Pauw
2020-05-28 14:30:56 +02:00
parent 780b8b7db9
commit d24c51e1cd

View File

@@ -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))