From: Chocobozzz Date: Thu, 11 Jan 2018 14:39:41 +0000 (+0100) Subject: Fix http token interceptor X-Git-Tag: v0.0.1-alpha~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cfe1efd200f80239e19f94335364ac9ef3813c19;p=oweals%2Fpeertube.git Fix http token interceptor --- 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) }