Fix http token interceptor

This commit is contained in:
Chocobozzz 2018-01-11 15:39:41 +01:00
parent 82750da396
commit cfe1efd200
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

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