mirror of https://github.com/Chocobozzz/PeerTube
Fix http token interceptor
parent
82750da396
commit
cfe1efd200
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue