Fix http token interceptor
This commit is contained in:
parent
82750da396
commit
cfe1efd200
|
@ -28,7 +28,7 @@ export class AuthInterceptor implements HttpInterceptor {
|
||||||
// Catch 401 errors (refresh token expired)
|
// Catch 401 errors (refresh token expired)
|
||||||
return next.handle(authReq)
|
return next.handle(authReq)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (err.status === 401) {
|
if (err.status === 401 && err.error && err.error.code === 'invalid_token') {
|
||||||
return this.handleTokenExpired(req, next)
|
return this.handleTokenExpired(req, next)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue