From cfe1efd200f80239e19f94335364ac9ef3813c19 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Jan 2018 15:39:41 +0100 Subject: [PATCH] Fix http token interceptor --- client/src/app/shared/auth/auth-interceptor.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/shared/auth/auth-interceptor.service.ts b/client/src/app/shared/auth/auth-interceptor.service.ts index 1e890d8f3..efcfc452b 100644 --- a/client/src/app/shared/auth/auth-interceptor.service.ts +++ b/client/src/app/shared/auth/auth-interceptor.service.ts @@ -28,7 +28,7 @@ export class AuthInterceptor implements HttpInterceptor { // Catch 401 errors (refresh token expired) return next.handle(authReq) .catch(err => { - if (err.status === 401) { + if (err.status === 401 && err.error && err.error.code === 'invalid_token') { return this.handleTokenExpired(req, next) } -- 2.25.1